aboutsummaryrefslogtreecommitdiff
path: root/reproduce/src/bash/git-pre-commit
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2019-03-06 17:42:17 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2019-03-06 17:42:17 +0000
commit2782b63c8d05591037e5099c601c370916bb7f66 (patch)
tree1785f24916a7188e3af76c439b0dbae9a9d4e9a7 /reproduce/src/bash/git-pre-commit
parentf546b49d3a8412ae03ea93856ebd170339eca55d (diff)
parent41865272cd80856eb466daef029a669225dbf139 (diff)
Imported work on many basic Python modules
With the help of Raul, we were able to build many higher-level Python packages to enable the installation of packages like Matplotlib and Astroquery. With this commit, that work is being merged into the master branch.
Diffstat (limited to 'reproduce/src/bash/git-pre-commit')
-rw-r--r--reproduce/src/bash/git-pre-commit11
1 files changed, 8 insertions, 3 deletions
diff --git a/reproduce/src/bash/git-pre-commit b/reproduce/src/bash/git-pre-commit
index ca28757..0fa6c52 100644
--- a/reproduce/src/bash/git-pre-commit
+++ b/reproduce/src/bash/git-pre-commit
@@ -20,8 +20,13 @@
# git reset HEAD -- .metadata
# git checkout HEAD -- .metadata
-# 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
# Function to help in reporting a crash.
exit_on_fail() {
@@ -34,12 +39,12 @@ exit_on_fail() {
# Run metastore.
exit_on_fail \
- @BINDIR@/metastore -O @USER@ -G @GROUP@ -s -f "$MSFILE"
+ $MSBIN -O @USER@ -G @GROUP@ -s -f "$MSFILE"
# If it's first metastore commit, store again to include $MSFILE in $MSFILE.
if ! git-ls-tree --name-only HEAD 2>/dev/null | grep -Fqx "$MSFILE"; then
exit_on_fail \
- @BINDIR@/metastore -O @USER@ -G @GROUP@ -s -f "$MSFILE"
+ $MSBIN -O @USER@ -G @GROUP@ -s -f "$MSFILE"
fi
# Check if the metadata file exists.