This commit is contained in:
luk.lu
2021-07-09 17:10:33 +08:00
parent c0be6a1da0
commit d8c7f0095e
5 changed files with 82 additions and 46 deletions

View File

@@ -4,32 +4,37 @@ if [ $1 ]
then
FONPATH=$1
else
read -p "Enter path to git pull (leave blank for default ../..) >> " FONPATH
read -p "Enter faronear path to git pull (leave blank for default ../..) >> " FONPATH
if [ ! $FONPATH ]
then
FONPATH=../..
fi
fi
echo ">> Goto $FONPATH as base directory"
if [ ! -d $FONPATH ]
then
echo "*** [$FONPATH] not exist! Exit now. ***"
exit
fi
pushd $FONPATH
echo ">> `pwd`"
echo "*** Current path = [`pwd`] ***"
for org in `ls .`
do
if [ -d $org ]
then
cd $org;
for repo in `ls .`
do
if [ -d $repo/.git ]
then
echo '>>>>>> git pulling: ' $org/$repo
cd $repo
git pull
cd ..
fi
done
cd ..;
then
cd $org;
for repo in `ls .`
do
if [ -d $repo/.git ]
then
echo "--- git pulling: $org/$repo"
cd $repo
git pull
cd ..
fi
done
cd ..;
fi
done
popd