Skip to content

Commit

Permalink
Create zcli-login.expect
Browse files Browse the repository at this point in the history
  • Loading branch information
nahbee10 authored Dec 18, 2024
1 parent a8f88c4 commit d5d9cee
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions bin/zcli-login.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/expect -f

set timeout -1

# Define environment variables
set subdomain [lindex $argv 0]
set email [lindex $argv 1]
set token [lindex $argv 2]

# Run zcli login
spawn zcli login -i
expect "Subdomain:"
send "$subdomain\r"
expect "Email:"
send "$email\r"
expect "API token:"
send "$token\r"
expect eof

0 comments on commit d5d9cee

Please sign in to comment.