SyncCode.sh 259 B

12345678910
  1. #!/bin/sh
  2. DEPLOY_DIR=/data/php
  3. if [ ! -d $DEPLOY_DIR ] ; then
  4. echo >&2 "fatal: post-receive: DEPLOY_DIR_NOT_EXIST: \"$DEPLOY_DIR\""
  5. exit 1
  6. fi
  7. # Goto the deploy dir and pull the latest sources
  8. cd $DEPLOY_DIR
  9. #env -i git reset --hard
  10. env -i git pull origin test