Last active
December 20, 2015 06:48
-
-
Save anscii/6087995 to your computer and use it in GitHub Desktop.
Mass svn up with auto svn+ssh password input via expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for PROJECT in Proj1 Proj2 | |
do | |
echo "##############" | |
echo "Starting ${PROJECT} update..." | |
cd /home/username/httpdocs/services/projects/${PROJECT} | |
expect <<- DONE | |
spawn svn up | |
expect { | |
"username@svn.domain.com's password:*" { | |
send -- "password\r" | |
exp_continue | |
} | |
eof { | |
exit 0} | |
} | |
send_user "success!\n" | |
DONE | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment