#!/bin/bashfunction showMsg(){ echo -e "\033[42;37m$1\033[0m"}function getdir(){ root_dir=${1-"/Users/chou/Documents/work/projects/iplat"}; # if [[ -z "$1" ]]; then # #statements # root_dir="" # fi echo 'root_dir:'$root_dir for element in `ls $root_dir` do dir_or_file=$root_dir"/"$element if [ -d $dir_or_file ] then cd $root_dir"/"$element showMsg 'git pull '$element git pull else echo $dir_or_file fi done}# root_dir="/Users/chou/Documents/work/projects/iplat"getdir $*;
sh batchGitPull.shsh batchGitPull.sh /Users/chou/Documents/work/projects/eplat