You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
582 B
Plaintext
21 lines
582 B
Plaintext
#!/usr/local/bin/expect -f
|
|
|
|
set force_conservative 0 ;# set to 1 to force conservative mode even if
|
|
;# script wasn't run conservatively originally
|
|
if {$force_conservative} {
|
|
set send_slow {1 .1}
|
|
proc send {ignore arg} {
|
|
sleep .1
|
|
exp_send -s -- $arg
|
|
}
|
|
}
|
|
|
|
set timeout -1
|
|
spawn doctl auth init
|
|
match_max 100000
|
|
expect -exact "Please authenticate doctl for use with your DigitalOcean account. You can generate a token in the control panel at https://cloud.digitalocean.com/account/api/tokens\r
|
|
\r
|
|
Enter your access token: "
|
|
send -- "$env(DIGITAL_OCEAN_TOKEN)\n"
|
|
expect eof
|