From b21911df41a5af215c5976e03d4d18a0b1abb33c Mon Sep 17 00:00:00 2001 From: EUcancER Date: Wed, 4 Jan 2012 01:31:30 +0100 Subject: //assets: simplified pre-commit hook --- assets/hooks/pre-commit | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/assets/hooks/pre-commit b/assets/hooks/pre-commit index 76677a76..6ad1ca2a 100755 --- a/assets/hooks/pre-commit +++ b/assets/hooks/pre-commit @@ -1,19 +1,8 @@ #!/bin/sh set -euf -DB="assets.json" -TMP=`mktemp` - -echo "** checking $DB for sanity" -cat $DB | python -m json.tool > $TMP -RET=$? -if [ "$RET" = "0" ]; -then - echo "** Database sanity verified" - #git add $DB - #mv $TMP $DB +if which truth2json;then + truth2json >/dev/null && echo "db verified" else - echo "!! Database insane" - cat $TMP + echo "cannot verify as truth2json is not installed" fi -rm $TMP -exit $RET + -- cgit v1.2.3