debRpmAutoInstall.sh 313 字节
Newer Older
1
#!/usr/bin/expect 
sangshuduo's avatar
sangshuduo 已提交
2
set packageName [lindex $argv 0]
3 4 5
set packageSuffix [lindex $argv 1]
set timeout 3 
if { ${packageSuffix} == "deb" } {
sangshuduo's avatar
sangshuduo 已提交
6
    spawn  dpkg -i ${packageName}
7
} elseif { ${packageSuffix} == "rpm"} {
sangshuduo's avatar
sangshuduo 已提交
8
    spawn rpm -ivh ${packageName}
9 10 11 12 13
}
expect "*one:"
send  "\r"
expect "*skip:"
send  "\r" 
haoranc's avatar
haoranc 已提交
14

sangshuduo's avatar
sangshuduo 已提交
15
expect eof