Created
July 8, 2010 20:22
-
-
Save jonuts/468559 to your computer and use it in GitHub Desktop.
This file contains 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/sh | |
GEMFILE_REPO=../drive-gemfile | |
cat <<EOM | |
*************************** | |
* UPDATING GEMFILE REPO * | |
* for rubytracker.com * | |
*************************** | |
EOM | |
test -f Gemfile && test -f Gemfile.lock || { | |
echo This repo is not bundled! | |
exit | |
} | |
git branch | grep --color=never "* master" || { | |
echo Not on master. Exiting. | |
exit | |
} | |
test -d $GEMFILE_REPO && test -d $GEMFILE_REPO/.git || { | |
echo $GEMFILE_REPO does not exist or is not a git repo. Exiting. | |
exit | |
} | |
cp Gemfile Gemfile.lock $GEMFILE_REPO | |
cd $GEMFILE_REPO | |
test `git diff | wc -l` -gt 0 || { | |
echo Gemfile is up to date | |
exit | |
} | |
git commit -am"AUTO-GEMFILE-UPDATE - `date`" | |
git push origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment