Advertisement
Guest User

Untitled

a guest
May 27th, 2015
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #!/bin/sh -x
  2.  
  3. DEPLOY_DIR=/root/deploy
  4. PROJECT_NAME="$1"
  5. cd $DEPLOY_DIR
  6. git init --bare ${PROJECT_NAME}.git
  7. mkdir $PROJECT_NAME
  8. cat <<EOF > ${PROJECT_NAME}.git/hooks/post-update
  9. #!/bin/sh
  10. GIT_WORK_TREE="${DEPLOY_DIR}/${PROJECT_NAME}" git checkout -f master
  11. EOF
  12. chmod +x ${PROJECT_NAME}.git/hooks/post-update
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement