Adding the expect script to sign

This commit is contained in:
James Jones
2022-12-08 11:54:19 -05:00
parent 982a623d04
commit 257241b84b
2 changed files with 17 additions and 1 deletions

13
rpm-sign-expect Normal file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/expect -f
set rpm [lindex $argv 0]
set passphrase [lindex $argv 1]
set email [lindex $argv 2]
set name [lindex $argv 3]
### rpm-sign-expect -- Sign RPMs by sending passphrase and other elements
spawn rpm --define "_gpg_name $name <$email>" --addsign $rpm
expect -exact "Enter pass phrase: "
send -- "$passphrase\r"
expect eof