aboutsummaryrefslogtreecommitdiff
path: root/reproduce/src
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2019-01-23 16:44:49 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2019-01-23 16:50:36 +0000
commit464f088506987ab775f6b28687fe8155c006f8ad (patch)
tree0a7d19d2214d6f443e71777622ae41ee154ffd6e /reproduce/src
parent796ed341fbeb9688eaabefe020977fba9f6f35f6 (diff)
Corrections in metastore's git hooks
Two corrections were made in the Git hooks of Metastore. 1) The shebang at the start of the scripts now uses the absolute adress of our installed bash, not the relative `.local/bin/bash'. Note that it is possible to use Git within subdirectories and in that scenario, the `.local' will fail. 2) The `$$user' section was removed from the command to find the user's group. With the user as an argument, `groups' may print the user's name first, then their list of groups. When this happens, the script would be just repeating the user's name. But the raw `groups' command will list the groups of the running user.
Diffstat (limited to 'reproduce/src')
-rw-r--r--reproduce/src/bash/git-post-checkout2
-rw-r--r--reproduce/src/bash/git-pre-commit2
-rw-r--r--reproduce/src/make/dependencies.mk2
3 files changed, 3 insertions, 3 deletions
diff --git a/reproduce/src/bash/git-post-checkout b/reproduce/src/bash/git-post-checkout
index 4c69b2d..25dc2ac 100644
--- a/reproduce/src/bash/git-post-checkout
+++ b/reproduce/src/bash/git-post-checkout
@@ -1,4 +1,4 @@
-#!.local/bin/bash
+#!@BINDIR@/bash
#
# The example hook script to store the metadata information of version
# controlled files (with each commit) using the `metastore' program.
diff --git a/reproduce/src/bash/git-pre-commit b/reproduce/src/bash/git-pre-commit
index 4373898..dbf7dc6 100644
--- a/reproduce/src/bash/git-pre-commit
+++ b/reproduce/src/bash/git-pre-commit
@@ -1,4 +1,4 @@
-#!.local/bin/bash
+#!@BINDIR@/bash
#
# The example hook script to store the metadata information of version
# controlled files (with each commit) using the `metastore' program.
diff --git a/reproduce/src/make/dependencies.mk b/reproduce/src/make/dependencies.mk
index 9f3436d..e9023b4 100644
--- a/reproduce/src/make/dependencies.mk
+++ b/reproduce/src/make/dependencies.mk
@@ -380,7 +380,7 @@ $(ibdir)/metastore: $(tdir)/metastore-$(metastore-version).tar.gz \
# fork of `metastore' currently hosted at:
# https://github.com/mohammad-akhlaghi/metastore
user=$$(whoami)
- group=$$(groups $$user | awk '{print $$1}')
+ group=$$(groups | awk '{print $$1}')
cd $$current_dir
if [ -f $@ ]; then
for f in pre-commit post-checkout; do