summaryrefslogtreecommitdiffstats
path: root/assets/bin/check-truth
diff options
context:
space:
mode:
authorroot <root@kremium>2011-12-07 12:42:09 +0100
committerroot <root@kremium>2011-12-07 12:44:55 +0100
commit9b77caeac2409a70010c22b12f843b1dcc29cfb7 (patch)
tree3e8dbbc3b47a6931e60716c94c4d42bbf1e03083 /assets/bin/check-truth
parentc1f839101be7d48f6e918e9e969cf0fc3d743ea4 (diff)
parentdc9f6a510182b6947a8ee58b1940dd4ce2a32fd7 (diff)
Merge branch 'master' of github.com:krebscode/painload
Conflicts: assets/bin/ass
Diffstat (limited to 'assets/bin/check-truth')
-rwxr-xr-xassets/bin/check-truth11
1 files changed, 11 insertions, 0 deletions
diff --git a/assets/bin/check-truth b/assets/bin/check-truth
new file mode 100755
index 00000000..6b55fdcd
--- /dev/null
+++ b/assets/bin/check-truth
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -euf
+DB=${1-"/krebs/db/truth"}
+HERE=$(dirname $(readlink -f $0))
+read LINE
+if (cat $DB;echo $LINE) | $HERE/truth2json - 1>/dev/null ;then
+ echo "success" 1>&2
+ echo "$LINE"
+else
+ echo "you fail" 1>&2
+fi