summaryrefslogtreecommitdiffstats
path: root/assets/bin/ass
blob: c82a2565b95df11fe45c6044c313b6638bb05698 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

set -euf

DB="/krebs/db"
JOURNAL="$DB/truth"
HERE=$(dirname $(readlink -f $0))

(cd $DB && git pull >/dev/null && echo "pulled new version")

METHOD="$1"; shift

case $METHOD in
"create")
  echo "`date --utc --rfc-3339=ns` create $1" | $HERE/check-truth | tee -a $JOURNAL
;;
"set")
  echo "`date --utc --rfc-3339=ns` set $1 $2 $3" | $HERE/check-truth | tee -a $JOURNAL 
;;
*)
  echo "you are made of stupid!"
  exit 23
;;
esac
(cd $DB && git commit -a -m bump >/dev/null && git push 1>&2 2>/dev/null && echo "updates pushed")&