fix: activate ne pkg issue
This commit is contained in:
16
misc/actpkg.sh
Normal file
16
misc/actpkg.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/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
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
expect <<EOF
|
||||
set timeout ${1}
|
||||
spawn dpkg -i --force-all ${3}
|
||||
expect {
|
||||
"y/n" { send "${2}\n";exp_continue }
|
||||
}
|
||||
EOF
|
||||
Reference in New Issue
Block a user