mirror of
https://github.com/robertstettner/drone-npm-auth.git
synced 2026-06-14 22:11:31 +08:00
23 lines
335 B
Plaintext
Executable File
23 lines
335 B
Plaintext
Executable File
#!/usr/bin/expect
|
|
|
|
set timeout 20
|
|
|
|
set cmd [lindex $argv 0]
|
|
set username [lindex $argv 1]
|
|
set password [lindex $argv 2]
|
|
set email [lindex $argv 3]
|
|
|
|
eval spawn $cmd
|
|
|
|
expect "Username: "
|
|
send "$username\r";
|
|
|
|
expect "Password: "
|
|
send "$password\r";
|
|
|
|
expect "Email: (this IS public) "
|
|
send "$email\r";
|
|
|
|
expect eof
|
|
|
|
puts $expect_out(buffer) |