summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-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