1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

for dir in $(ls)
do
if [ -d $dir ]
then
# echo $dir
cd $dir && echo $dir
if [ -d ".git" ] && $dir != 'frontend'
then
git pull origin master
else
echo "文件夹还没有git(或者忽略git pull),请注意把代码保存的远程仓库哦!"
fi
cd ..
fi
echo '----------------------------------------'
done