From 581224a29867864e6b6714d147b8b7b7107d7e7f Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 27 Sep 2015 21:30:53 +0200 Subject: locationfoo is back. whee. --- helpers/append-location | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 helpers/append-location (limited to 'helpers') diff --git a/helpers/append-location b/helpers/append-location new file mode 100755 index 0000000..0e1af89 --- /dev/null +++ b/helpers/append-location @@ -0,0 +1,10 @@ +#!/bin/zsh + +lastloc=$(tail -n 1 ~/var/log/location) +newloc=$1 + +if echo $lastloc | fgrep -q $newloc; then + exit 0 +fi + +printf "%s %-10s %s\n" "$(date -R)" $newloc $SSH_CLIENT[(w)1] >> ~/var/log/location -- cgit v1.2.3