Skip to content

Instantly share code, notes, and snippets.

@jpartain89
Last active February 4, 2016 04:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpartain89/4cce0c7be71dd108a506 to your computer and use it in GitHub Desktop.
Save jpartain89/4cce0c7be71dd108a506 to your computer and use it in GitHub Desktop.
#! /bin/bash
# Shell Script to quickly pull my git repos
main ()
{
for f in $git_dir*/;
do
if [[ -d "$f" ]]; then
cd "$f" || exit;
git pull >> "$LOGFILE" 2>&1 ;
echo "Just finished pulling $f!";
fi
done
}
git_dir="/Users/jpartain89/git/"
LOGFILE=/Users/jpartain89/git/pull_logs.txt
main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment