Created
August 24, 2012 18:27
-
-
Save swalberg/3454011 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
TMPFILE=`mktemp /tmp/wave.XXXXXX` || exit 1 | |
USERNAME=my_github_user_name | |
PASSWORD=my_password | |
curl -s --location -u $USERNAME:$PASSWORD https://github.com/waveaccounting/documentation/raw/master/devops/ssh_config | sed "s/USERNAME/$USERNAME/;/Identity/d" > $TMPFILE | |
lead='BEGIN WAVE SERVERS' | |
tail='END WAVE SERVERS' | |
sed -i.bak -e "/$lead/,/$tail/{ | |
/$lead/ { | |
p | |
r $TMPFILE | |
} | |
/$tail/p | |
d | |
}" ~/.ssh/config | |
rm $TMPFILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment