psss / rpms / checkpolicy

Forked from rpms/checkpolicy 5 years ago
Clone
Blob Blame History Raw
#!/usr/bin/expect -f
# ./sedispol.exp option policyfile outputfile
set option [lrange $argv 0 0]
set policyfile [lrange $argv 1 1]
set outputfile [lrange $argv 2 2]
set timeout 60
spawn sedispol $policyfile
expect "Command*:" {
  send -- "f\r"
}
expect "Filename*:" {
  send -- "$outputfile\r"
}
expect "Command*:" {
  send -- "$option\r"
}
expect "Command*:" {
  send -- "q\r"
}
expect eof