Skip to content

Instantly share code, notes, and snippets.

@swaldman3
Created September 8, 2013 07:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swaldman3/6482639 to your computer and use it in GitHub Desktop.
Save swaldman3/6482639 to your computer and use it in GitHub Desktop.
My current dwu script
#!/bin/bash
# make sure we are in the right directory;
# save previous directory
oldpwd=$PWD
cd $LJHOME
oldbranch1=$(git symbolic-ref --short -q HEAD)
# pull changes from dreamwidth
git checkout develop
git pull --ff-only upstream develop
git checkout master
git pull --ff-only upstream master
# push them to Github forks
git push origin develop
git push origin master
git checkout $oldbranch1
# change to dw-nonfree
cd $LJHOME/ext/dw-nonfree
oldbranch2=$(git symbolic-ref --short -q HEAD)
# pull changes from dw-nonfree
git checkout develop
git pull --ff-only upstream develop
git checkout master
git pull --ff-only upstream master
# push them to Github forks
git push origin develop
git push origin master
git checkout $oldbranch2
# return to previous directory
cd $oldpwd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment