Skip to content

Instantly share code, notes, and snippets.

@nurse
Created July 25, 2011 13:52
Show Gist options
  • Save nurse/1104171 to your computer and use it in GitHub Desktop.
Save nurse/1104171 to your computer and use it in GitHub Desktop.
git-up - update the repository
#!/bin/sh
# If you may use this through git like git up,
# add a line like following to [alias] section of ~/.gitconfig
# up = "!~/bin/git-up"
if [ -d tools/clang ]
then
svn up
cd tools/clang
svn up
exit
fi
if [ -d .git/svn ]
then
git svn rebase -v --all
else
git fetch -v --all
fi
if [ -f tool/file2lastrev.rb ]
then
ruby tool/file2lastrev.rb --revision.h . > revision.tmp
tool/ifchange "--timestamp=.revision.time" "revision.h" "revision.tmp"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment