有时候想对本地的几个repository都进行一下pull,一个一个操作比较繁琐,所以写了个shell脚本进行简化操作。
-
git_pull_all.sh
#!/bin/sh clear function showMsg() { echo -e " 33[32m$1 33[0m" } lstRepo=( Project01 Project02 Project03 Project04 ) for repo in ${lstRepo[@]} do cd ../$repo showMsg '开始git pull '$repo git pull done
-
start_pull.sh
#!/bin/sh clear ./git_pull_all.sh echo echo echo echo echo -e " 33[32m===================================== 33[0m" echo -e " 33[32mPress any key to exit 33[0m" echo -e " 33[32m===================================== 33[0m" read