File: //installd/perl588installer/installscripts/expectcpan
#!/usr/bin/expect --
spawn /scripts/perlinstaller CPAN
set question "\\?.*\\\["
set questions "\\\[.*\\\] "
set timeout 300
while {1} {
expect {
"*perlmod--Install done*" {
exit
}
"*Apache source not found*" {
send "q\r"
}
"*Which OpenSSL build path*" {
send "/usr\r"
}
"*path name or q to quit*" {
send "q\r"
}
"*run the tests anyway*" {
send "no\r"
}
"*update your config*" {
send "no\r"
}
"*mod_perl*\\?*" {
send "n\r"
}
"*you continent*" {
send "5\r"
}
"*country*" {
send "4\r"
}
"*Build JPEG support*" {
if {[file exists "/usr/lib/libjpeg.a"]} {
send "y\r"
} else {
send "n\r"
}
}
"*please give the full path to an httpd*" {
send "!\r"
}
"*where I can find your apache src*" {
send "q\r"
}
"*Build XPM support*" {
if {[file exists "/usr/X11R6/lib/libXpm.a"]} {
send "y\r"
} else {
send "n\r"
}
}
"*_proxy\?*" {
send "\r"
}
"*Build FreeType support*" {
if {[file exists "/usr/lib/libttf.so.2"] || [file exists "/usr/lib/libttf.so.1"]} {
send "n\r"
} else {
send "n\r"
}
}
"*XALAN base directory*" {
send ".\r"
}
"*add the remove instructions*" {
send "no\r"
}
"*put them on one line*" {
send "1\r"
}
"*manual configuration*" {
send "no\r"
}
"*choice:*" {
send "\r"
}
-re $question {
send "\r"
}
-re $questions {
send "\r"
}
timeout {send "\r"; exp_continue}
default {}
}
}