diff options
author | Raul Infante-Sainz <infantesainz@gmail.com> | 2019-02-28 12:32:19 +0000 |
---|---|---|
committer | Raul Infante-Sainz <infantesainz@gmail.com> | 2019-02-28 12:32:19 +0000 |
commit | 62cb377a954921ef7940059e6dfb8521f9698c32 (patch) | |
tree | 9c3946535d7940b6e6ae6d2b3bde60c5edd11bd7 /reproduce/src/bash/git-post-checkout | |
parent | a92b25adb31bde17fe4db4f37be11bbe389fdf4b (diff) |
Git hooks for metastore check for the existance of metastore
Until now, once the Git hooks have been installed (after the
installation of Metastore), if metastore doesn't exist (for example by
manually deleting the build directory for a re-build with same
configurations as before) we can't run `git commit' and `git checkout'
will print an ugly warning.
With this commit, the two Git hooks check for the existance of Metastore
and if it doesn't exist, they won't do anything.
Diffstat (limited to 'reproduce/src/bash/git-post-checkout')
-rw-r--r-- | reproduce/src/bash/git-post-checkout | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/reproduce/src/bash/git-post-checkout b/reproduce/src/bash/git-post-checkout index e2a0fd0..153b277 100644 --- a/reproduce/src/bash/git-post-checkout +++ b/reproduce/src/bash/git-post-checkout @@ -9,8 +9,13 @@ # special characters for the installation location of meta-store so our own # installation is found by Git. -# File containig the metadata. +# File containig the metadata and metastore executable. MSFILE=".file-metadata" +MSBIN=@BINDIR@/metastore + +# If metastore is not installed, then ignore this script (exit with a +# status of 0). +if [ ! -f $MSBIN ]; then exit 0; fi # Delete all temporary files find @TOP_PROJECT_DIR@/ -name "*~" -type f -delete @@ -32,7 +37,7 @@ fi # Run metastore. exit_on_fail \ - @BINDIR@/metastore -a -m -e -E -q -O @USER@ -G @GROUP@ -f "$MSFILE" + $MSBIN -a -m -e -E -q -O @USER@ -G @GROUP@ -f "$MSFILE" # Return with a success code (0). exit 0 |