diff options
Diffstat (limited to 'share')
-rwxr-xr-x | share/templater/pushtodeploy/setup | 2 | ||||
-rw-r--r-- | share/templater/templater/files/Makefile | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/share/templater/pushtodeploy/setup b/share/templater/pushtodeploy/setup index 78e216f..b7c3c67 100755 --- a/share/templater/pushtodeploy/setup +++ b/share/templater/pushtodeploy/setup @@ -20,7 +20,7 @@ function templater_pushtodeploy { if [ -e "Makefile" ]; then if ! grep -q "^post_receive:" Makefile; then echo "post_receive:" >> Makefile - echo -e "\tcd .git/hooks && ln -sf ../../bin/post-receive" >> Makefile + echo -e "\ttest -s bin/post-receive && cd .git/hooks && ln -sf ../../bin/post-receive" >> Makefile fi fi else diff --git a/share/templater/templater/files/Makefile b/share/templater/templater/files/Makefile index a53fcbb..02c7af6 100644 --- a/share/templater/templater/files/Makefile +++ b/share/templater/templater/files/Makefile @@ -13,6 +13,9 @@ serve: #python3 -m http.server #php -S localhost:8000 +post_receive: + test -s bin/post-receive && cd .git/hooks && ln -sf ../../bin/post-receive + # Process any other Makefile whose filename matches Makefile.* # See https://www.gnu.org/software/make/manual/html_node/Include.html -include Makefile.* |