Skip to content

Instantly share code, notes, and snippets.

@axiak
Created March 19, 2013 22:04
Show Gist options
  • Save axiak/5200560 to your computer and use it in GitHub Desktop.
Save axiak/5200560 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [[ -z $1 ]]; then
cd ~/Documents
find . -maxdepth 1 -type d -print0 | xargs -P8 -n1 -0 $0
rm -f /tmp/*.git.log
exit 0
fi
cd "$1"
if [[ -e ".git" ]]; then
git pull origin &> /tmp/$$.git.log
if [[ $? -ne 0 ]]; then
echo "Failed "$(basename $(pwd))
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment