branch=$1 csvdata=$2 dist=$3 if [[ $branch == '' ]]; then echo "输入 要同步的分支 eg: develop" exit fi if [[ $dist == '' ]]; then dist="./dist" fi if [[ $csvdata == '' ]]; then echo "输入 要同步的配表分支 eg: develop" exit fi git checkout $branch git pull cd src/csvdata git checkout $csvdata git pull cd - rsync -aP --exclude=".git" ./src/ ${dist}/src/ rsync -aP ./publish/skynet ${dist}/ rsync -aP --exclude={config/develop.lua,config/nodenames.lua} config ${dist}/ # cp kill.sh ${dist}/ # cp run.sh ${dist}/ # rsync -aP --exclude-from="./publish/exclude.list" ${origin}/ ./${dist}/