summaryrefslogtreecommitdiffstats
path: root/assets
diff options
context:
space:
mode:
authorroot <root@kremium>2011-12-07 12:41:42 +0100
committerroot <root@kremium>2011-12-07 12:41:42 +0100
commitc1f839101be7d48f6e918e9e969cf0fc3d743ea4 (patch)
treee587fc7447265ab6699429c82e0316750025d425 /assets
parenteb83ab295d17f957fb775903ff24a7ada829ff9e (diff)
/assets/bin: ass - add (future) check-truth command
Diffstat (limited to 'assets')
-rwxr-xr-xassets/bin/ass13
1 files changed, 8 insertions, 5 deletions
diff --git a/assets/bin/ass b/assets/bin/ass
index d29ea7e6..87b750d3 100755
--- a/assets/bin/ass
+++ b/assets/bin/ass
@@ -2,20 +2,23 @@
set -euf
-JOURNAL="/krebs/db/truth"
+DB="/krebs/db"
+JOURNAL="$DB/truth"
-METHOD="$1"
-shift
+(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" | tee -a $JOURNAL
+ echo "`date --utc --rfc-3339=ns` create $1" | check-truth | tee -a $JOURNAL
;;
"set")
- echo "`date --utc --rfc-3339=ns` set $1 $2 $3" | tee -a $JOURNAL
+ echo "`date --utc --rfc-3339=ns` set $1 $2 $3" | 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")&