Created
June 16, 2017 07:53
-
-
Save mrousavy/0d2564579f952a013219bec9d683d171 to your computer and use it in GitHub Desktop.
Pull for every subfolder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Console Colors (Green, NoColor) | |
GREEN='\033[0;32m' | |
NC='\033[0m' | |
# Loop over all Directories | |
for path in *; do | |
[ -d "${path}" ] || continue # if not a directory, skip | |
dirname="$(basename "${path}")" | |
cd $dirname # Go into Directory | |
printf "${GREEN}$dirname: ${NC}" | |
git pull # Pull from github | |
cd .. # Go back to base directory | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment