blob: 736bf57625c407eeae912ed548c7dc0d5e084495 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/usr/bin/perl -w
use Expect;
my $exp = Expect->spawn("make oldconfig")
or die "Cannot spawn make oldconfig: $!\n";
my $timeout = 10;
$exp->expect($timeout,
[ '^ *choice\[.*\]: ' => sub { $exp->send("\n"); exp_continue; } ],
[ '^([^ ]| *[^>0-9]).*\(NEW\) ' => sub { $exp->send("n\n"); exp_continue; } ],
[ "configuration written to .config" ],
) || die "Timeout"
|