16 lines
342 B
Bash
16 lines
342 B
Bash
#!/bin/bash
|
|
|
|
expect <<EOF
|
|
set timeout 180
|
|
if [[ ${1} == *.deb ]]; then
|
|
spawn dpkg -i --force-all ${1}
|
|
elif [[ ${1} == *.rpm ]]; then
|
|
spawn rpm -Uvh ${1}
|
|
else
|
|
exit 1
|
|
#"The file does not have a .deb or .rpm extension"
|
|
fi
|
|
expect {
|
|
"y/n" { send "n\n";exp_continue }
|
|
}
|
|
EOF |