summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-02-12 17:36:21 +0100
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-02-12 17:36:21 +0100
commita697e8cf3bc6af98de735115177fd5b54462b3e7 (patch)
tree1aa4f129bb1c6e0aab14d2b851b699ab790cad17
parentf3366b11f887652fcf71d1b23872adcfbbb25904 (diff)
fix: update path for hook
-rw-r--r--Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index cdd6bf7..6a7eb11 100644
--- a/Makefile
+++ b/Makefile
@@ -8,11 +8,14 @@ install:
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f bin/stagit-new-repo bin/stagit-gen-index $(DESTDIR)$(PREFIX)/bin/
chmod 755 $(DESTDIR)$(PREFIX)/bin/stagit-gen-index $(DESTDIR)$(PREFIX)/bin/stagit-new-repo
- mkdir -p /home/git/hooks
- cp hooks/post-receive /home/git/hooks/
+ cp hooks/post-receive $(DESTDIR)$(PREFIX)/share/
+ if [ "$(PREFIX)" ]; then \
+ sed -iba 's:/usr/local:$(PREFIX)' $(DESTDIR)$(PREFIX)/bin/stagit-new-repo; \
+ rm -f $(DESTDIR)$(PREFIX)/bin/stagit-new-repoba; \
+ fi
uninstall:
rm $(DESTDIR)$(PREFIX)/bin/stagit-gen-index $(DESTDIR)$(PREFIX)/bin/stagit-new-repo
- rm /home/git/hooks/post-receive
+ rm $(DESTDIR)$(PREFIX)/share/post-receive
.PHONY: install uninstall