]> git.phdru.name Git - git-scripts.git/blobdiff - copy-scripts/post-update
Add `copy-scripts/`: Copy this repo to a remote host
[git-scripts.git] / copy-scripts / post-update
similarity index 73%
rename from hooks/post-update
rename to copy-scripts/post-update
index 3350fa84c5a8511d56587b321b31daa3fed8a3fe..78fc50d4cebb3fd185eae7008fb025e74cfd92ae 100755 (executable)
@@ -6,9 +6,7 @@ for ref in "$@"; do
    if [ "$ref" = refs/heads/master ]; then
       unset GIT_DIR
       cd ../git-scripts &&
-      if ! git remote show -n origin 2>/dev/null; then
-         git remote add origin ../git-scripts.git
-      fi &&
+      git checkout master &&
       git pull origin master &&
       git push origin master
       exit