summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2013-10-22 20:44:32 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2013-10-22 20:44:32 +0200
commitb48cb3ff989c7c8ad89f04c8eda5a0e8cf091bf7 (patch)
tree250a8f2a2057663aafb1402c0344f98121c91f28
parent34e60841a44ee688792e87863aa67db469d39fa8 (diff)
downloadappstore-b48cb3ff989c7c8ad89f04c8eda5a0e8cf091bf7.tar.gz
appstore-b48cb3ff989c7c8ad89f04c8eda5a0e8cf091bf7.tar.bz2
appstore-b48cb3ff989c7c8ad89f04c8eda5a0e8cf091bf7.tar.xz
appstore-b48cb3ff989c7c8ad89f04c8eda5a0e8cf091bf7.zip
wip
-rw-r--r--Makefile7
-rwxr-xr-xhooks/post-receive2
-rw-r--r--lib/header-hook2
3 files changed, 5 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 49538be..ba3a58e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
all: test docs
BINS=$(wildcard bin/*) $(wildcard libexec/*)
+HOOKS=$(wildcard hooks/*)
BATS=$(sort $(patsubst test/%,%,$(filter-out test/X-%,$(wildcard test/*.bats))))
TESTS=$(addprefix test-,$(BATS))
@@ -30,12 +31,10 @@ set_header-$(1):
if [ `md5sum $(1)|cut -f 1 -d ' '` != `md5sum x|cut -f 1 -d ' '` ]; then echo Updated: $(1); cp x $(1); fi; \
rm x
endef
- $(wildcard hooks/*)
$(foreach f,$(BINS),$(eval $(call set_header,$(f),lib/header)))
-set-headers: set-hook-headers $(addprefix set_header-,$(BINS))
-
-$(foreach f,$(wildcard hooks/*),$(eval $(call set_header,$(f),lib/hook-header)))
set-headers: $(addprefix set_header-,$(BINS))
+$(foreach f,$(HOOKS),$(eval $(call set_header,$(f),lib/header-hook)))
+set-headers: $(addprefix set_header-,$(HOOKS))
.PHONY: set-headers
diff --git a/hooks/post-receive b/hooks/post-receive
index ced1fc4..a2835de 100755
--- a/hooks/post-receive
+++ b/hooks/post-receive
@@ -3,7 +3,7 @@
set -e
set -u
-APPSTORE_HOME=$(cd $(dirname "$0")/.. && pwd)
+APPSTORE_HOME=$(git config appstore.home)
. $APPSTORE_HOME/lib/common
# HEADER END
diff --git a/lib/header-hook b/lib/header-hook
index ccd343e..96ec9db 100644
--- a/lib/header-hook
+++ b/lib/header-hook
@@ -3,6 +3,6 @@
set -e
set -u
-APPSTORE_HOME=$(cd $(dirname "$0")/.. && pwd)
+APPSTORE_HOME=$(git config appstore.home)
. $APPSTORE_HOME/lib/common