From a697e8cf3bc6af98de735115177fd5b54462b3e7 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sat, 12 Feb 2022 17:36:21 +0100 Subject: fix: update path for hook --- Makefile | 9 ++++++--- 1 file 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 -- cgit v1.2.3-70-g09d2