Files
v2rayA/install/tool/reprepro_expect
T

26 lines
766 B
Plaintext
Executable File

#!/usr/bin/expect -f
set timeout 30
set passphrase "$env(SIGNING_PASSWORD)"
# Call reprepro with variable length arguments, so that this script
# takes the same arguments as the original program
spawn reprepro {*}$argv
expect {
timeout {send_error "\nFailed to get password prompt\n";
exit 1}
"*assphrase*" {send -- "$passphrase\r";
send_user " *** entering passphrase ***";
exp_continue}
}
# Get the pid, spawnid, oserr and exitcode from the spawned reprepro command
set returnvalues [wait]
# Extract the reprepro exit code
set exitcode [lindex $returnvalues 3]
# Exit with the exitcode from reprepro (0 on success)
exit $exitcode