mirror of
https://github.com/ventoy/Ventoy.git
synced 2026-06-29 14:38:12 +00:00
20 lines
399 B
Plaintext
20 lines
399 B
Plaintext
#!/usr/bin/expect -f
|
|
|
|
set password [lindex $argv 0]
|
|
set key_file [lindex $argv 1]
|
|
set cert_file [lindex $argv 2]
|
|
set input_file [lindex $argv 3]
|
|
set output_file [lindex $argv 4]
|
|
|
|
|
|
spawn bash -c "sbsign --key '$key_file' --cert '$cert_file' --output '$output_file' '$input_file' 2>&1"
|
|
expect -nocase -re "Enter PEM pass phrase:"
|
|
send "$password\r"
|
|
|
|
|
|
expect eof
|
|
|
|
|
|
set ret [wait]
|
|
exit [lindex $ret 3]
|