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
#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.*