Skip to content

Instantly share code, notes, and snippets.

@mbierman
Created December 26, 2012 18:32
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 mbierman/4382071 to your computer and use it in GitHub Desktop.
Save mbierman/4382071 to your computer and use it in GitHub Desktop.
Bash script to pull a bunch of directories and exclude a few by name.
#!/bin/bash
START_HERE="/Users/mbierm1/git";
cd $START_HERE;
echo -e "\nPulling down latest for $START_HERE\n";
for d in $(find . -maxdepth 1 -mindepth 1 -type d -not \( -name dir_1 -o -name dir_2 \) ); do
echo -e "$d";
cd $d;
git remote -v;
git pull;
cd $START_HERE;
done
echo -e "\nGithub sync complete. \n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment