diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-11-17 10:19:41 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-11-17 10:19:41 -0200 |
commit | 9ece5a26c95e040e1ddc4d1095fb0e7fdfaf4efc (patch) | |
tree | 1da308d7bd6f45b2f3854464c895164f1eea1ccf | |
parent | 36d2c36e422a416cf976e490ff9df2fdc1b65aca (diff) | |
download | templater-9ece5a26c95e040e1ddc4d1095fb0e7fdfaf4efc.tar.gz templater-9ece5a26c95e040e1ddc4d1095fb0e7fdfaf4efc.tar.bz2 |
Adds post_receive target into main Makefile
-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.* |