You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
493 B

  1. #!/usr/bin/expect -f
  2. set timeout 3
  3. set PACKAGE [lindex $argv 0]
  4. set GPG_PASSPHRASE $env(GPG_PASSPHRASE)
  5. if {[llength $argv] == 0} {
  6. send_user "Usage: ./sign <rpm_package>\n"
  7. exit 1
  8. }
  9. send_user "\nSigning $PACKAGE\n"
  10. spawn rpmsign --resign $PACKAGE
  11. expect {
  12. timeout { send_user "\nTimeout signing $PACKAGE\n"; exit 1 }
  13. "Enter pass phrase:"
  14. }
  15. send "$GPG_PASSPHRASE\r"
  16. expect {
  17. timeout { send_user "\nTimeout signing $PACKAGE\n"; exit 1 }
  18. "Pass phrase is good."
  19. }
  20. interact
  21. sleep 3