Skip to content

Instantly share code, notes, and snippets.

@lukaszkorecki
Created September 24, 2014 11:06
Show Gist options
  • Save lukaszkorecki/bbeb8e18153e57bf65cd to your computer and use it in GitHub Desktop.
Save lukaszkorecki/bbeb8e18153e57bf65cd to your computer and use it in GitHub Desktop.
root=$(pwd)
log() {
logger -s -t $(basename $0) -- "$*"
}
for path in $(find . -name .git -type d | grep -v vendor ) ; do
cd $path/..
log "---------- In $(pwd)"
git checkout master && git pull -r 2>&1 > /dev/null
if [[ "$?" != 0 ]] ; then
log "FAILED"
else
log "OK"
fi
cd $root
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment