Skip to content

Instantly share code, notes, and snippets.

@baldrick
Created November 28, 2011 11:14
Show Gist options
  • Save baldrick/1400028 to your computer and use it in GitHub Desktop.
Save baldrick/1400028 to your computer and use it in GitHub Desktop.
Repeatedly pull from a git repo to help identify problems with github
export SSH=../git-ssh-wrapper.sh
PROJ=$1
STDOUT=../repgit.$PROJ.stdout
STDERR=../repgit.$PROJ.stderr
cd $PROJ
while true
do
echo "---------------------------------------------------" >>$STDOUT
echo "---------------------------------------------------" >>$STDERR
date >>$STDOUT
date >>$STDERR
echo "---------------------------------------------------" >>$STDOUT
echo "---------------------------------------------------" >>$STDERR
git pull 1>>$STDOUT 2>>$STDERR
if [ $? -ne 0 ]
then
echo Error
exit
fi
sleep 5
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment