Skip to content

Instantly share code, notes, and snippets.

@jamiew
Created July 13, 2010 17:45
Show Gist options
  • Save jamiew/474228 to your computer and use it in GitHub Desktop.
Save jamiew/474228 to your computer and use it in GitHub Desktop.
shell script to update from various SCMs
## subversion
if [ -e ".svn" ]; then
svn up
## cvs
elif [ -e "CVS" ]; then
cvs up -dP
## darcs
elif [ -e "_darcs" ]; then
darcs pull --all
## svk
#elif [ -n '`grep "$HERE" ~/.svk/config`' ]; then
# svk up
## git
# FIXME gotta be a better way to check parent dirs... e.g. git-show-branch
#elif [ -e ".git" || -e "../.git" || -e "../../.git" ]; then
elif [ -e ".git" ]; then
#git pull
git fetch && git rebase origin/master
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment