Skip to content

Instantly share code, notes, and snippets.

@swalberg
Created August 24, 2012 18:27
Show Gist options
  • Save swalberg/3454011 to your computer and use it in GitHub Desktop.
Save swalberg/3454011 to your computer and use it in GitHub Desktop.
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