summaryrefslogtreecommitdiffstats
path: root/assets/bin/check-truth
blob: 6b55fdcd092fc4ad0665db15294773067f121770 (plain)
1
2
3
4
5
6
7
8
9
10
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