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

expect eof