summaryrefslogtreecommitdiffstats
path: root/assets
diff options
context:
space:
mode:
authorEUcancER <root@euer.krebsco.de>2012-01-04 01:31:30 +0100
committerEUcancER <root@euer.krebsco.de>2012-01-04 01:31:30 +0100
commitb21911df41a5af215c5976e03d4d18a0b1abb33c (patch)
treeb651309abc1c1d6e56a1536c5a9d581922b2a1b6 /assets
parent153aa86095c6f41d05f2a7abe5c1edbd195a0957 (diff)
//assets: simplified pre-commit hook
Diffstat (limited to 'assets')
-rwxr-xr-xassets/hooks/pre-commit19
1 files 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
+