#/bin/bash cd /root/phone echo "update guanwang phone version" git pull if [ $? -ne 0 ]; then echo "update guanwang phone version from git failed" exit 1 fi rsync -avzP --delete /root/phone *.*.*.*:/data/website/company/ if [ $? -ne 0 ]; then echo "rsync phone dir failed" exit 1 fi echo "phone update success" cd /root/web echo "update guanwang web version" git pull if [ $? -ne 0 ]; then echo "update guanwang web version from git failed" exit 1 fi rsync -avzP --delete /root/web *.*.*.*:/data/website/company/ if [ $? -ne 0 ]; then echo "rsync web dir failed" exit 1 fi echo "web update success"