-
-
Save swaldman3/6482639 to your computer and use it in GitHub Desktop.
My current dwu script
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
#!/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