From 464f088506987ab775f6b28687fe8155c006f8ad Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Wed, 23 Jan 2019 16:44:49 +0000 Subject: 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. --- reproduce/src/bash/git-post-checkout | 2 +- reproduce/src/bash/git-pre-commit | 2 +- reproduce/src/make/dependencies.mk | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'reproduce/src') 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 -- cgit v1.2.1