Created
December 28, 2016 06:27
-
-
Save was0107/1d87012db3873310053d66519efd41b5 to your computer and use it in GitHub Desktop.
pull当前目录下的所有GIT项目
This file contains hidden or 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
#!bin/bash | |
WORK_PATH="$PWD" | |
function list() { | |
SAVEIFS=$IFS | |
IFS=$'\n' | |
for file in $1/* | |
do | |
echo $file | |
if [[ -d "$file" ]] ; then | |
cd $file | |
git pull origin master | |
fi | |
done | |
IFS=$SAVEIFS | |
} | |
list "$WORK_PATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment