summaryrefslogtreecommitdiff
path: root/tools/pre-commit
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-12 00:29:22 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-12 00:30:00 -0400
commit5260d195484c65864437740954abc1182d781002 (patch)
treef1a58c7abe2dca424b104a4e778bafd3b80d9f1e /tools/pre-commit
parent3e4b08478be15a9d16a18e09ddaf98afe7cdc8b7 (diff)
downloadfork-ledger-5260d195484c65864437740954abc1182d781002.tar.gz
fork-ledger-5260d195484c65864437740954abc1182d781002.tar.bz2
fork-ledger-5260d195484c65864437740954abc1182d781002.zip
Minor corrections to tools/pre-commit
Diffstat (limited to 'tools/pre-commit')
-rwxr-xr-xtools/pre-commit18
1 files changed, 11 insertions, 7 deletions
diff --git a/tools/pre-commit b/tools/pre-commit
index fb62c49d..db47cc45 100755
--- a/tools/pre-commit
+++ b/tools/pre-commit
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Exit with status 1 if any command below fails
set -e
@@ -10,10 +10,13 @@ if echo $(git rev-parse --symbolic-full-name HEAD) | \
fi
# These are the locations I keep my temporary source and build trees in
-PRODUCTS=$(./acprep products) # generates a build directory name such as
+PRODUCTS=$(./acprep products) # generates a build directory name such as
# ~/Products/ledger
-TMPDIR=$PRODUCTS/ledger/pre-commit
-MIRROR=$PRODUCTS/ledger/pre-commit-mirror
+if echo $PRODUCTS | grep -qv ledger; then
+ PRODUCTS=$PRODUCTS/ledger
+fi
+TMPDIR=$PRODUCTS/pre-commit
+MIRROR=$PRODUCTS/pre-commit-mirror
# Checkout a copy of the current index into MIRROR
git checkout-index --prefix=$MIRROR/ -af
@@ -46,16 +49,17 @@ if [ ! -f Makefile -o \
\( -f acprep -a acprep -nt Makefile \) ]
then
if [ -f acprep ]; then
- echo Will run acprep in a moment
+ echo Will run acprep in a moment
elif [ -f autogen.sh ]; then
- sh autogen.sh && ./configure
+ sh autogen.sh && ./configure
else
- autoreconf && ./configure
+ autoreconf && ./configure
fi
fi
# Finally, (re)build this proposed source tree and see if it passes
# muster.
+
if [ -f acprep ]; then
nice -n 20 ./acprep default --warn make check
else