Skip to content

Commit

Permalink
Add autosign tool
Browse files Browse the repository at this point in the history
  • Loading branch information
matlinuxer2 committed Nov 17, 2014
1 parent 26f016a commit 1cf21fb
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions pkg/deb/autosign
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/usr/bin/expect

if { $argc < 1 } {

send_user " usage: \n"
send_user " \n"
send_user " autosign <command + arguments>\n"
send_user " \n"
send_user " ex: autosign debuild -S\n"
send_user " \n"
send_user " \n"

exit

}

catch { exec stty -echo }
send_user "The password for gpg signing: "
expect_user -re "(.*)\n" { set PASSWD $expect_out(1,string) }
send_user "\n"
catch { exec stty echo }


#### main spawning process ####
eval spawn $argv

trap {
send ":kill"
exit
} SIGINT


set pid [exp_pid]
while { $pid > 0 } {
expect {
"nter passphrase:" {
send "$PASSWD"
}
"continue anyway? (y/n)" {
send "y"
}
"debchange: Did you see that warning? Press RETURN to continue..." {
send ""
}
timeout {
exp_continue
}
eof {
exit
}

}
}

exit

Expand Down

0 comments on commit 1cf21fb

Please sign in to comment.