diff options
author | Daniel Friesel <derf@finalrewind.org> | 2015-09-27 21:30:53 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2015-09-27 21:30:53 +0200 |
commit | 581224a29867864e6b6714d147b8b7b7107d7e7f (patch) | |
tree | 3be17020c4585f7891a8617d46831fe38d48d3a4 /helpers | |
parent | 6b3a1f55ff23e5a888994737d2b64f9ebbd7c08d (diff) |
locationfoo is back. whee.
Diffstat (limited to 'helpers')
-rwxr-xr-x | helpers/append-location | 10 |
1 files changed, 10 insertions, 0 deletions
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 |