diff options
author | tv <tv@shackspace.de> | 2015-08-05 21:06:19 +0200 |
---|---|---|
committer | tv <tv@shackspace.de> | 2015-08-05 21:08:58 +0200 |
commit | 6d1553b092da48df6894e36f6ee95dcaafce5f84 (patch) | |
tree | 1aae33ab700e3e6833656db74ad35425004706e4 | |
parent | 20556f00927ccc39b23b99e04a0db0a942fa7172 (diff) |
cac: rename cac{_listservers,}_cache
-rwxr-xr-x | cac | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -42,7 +42,7 @@ sed ' } # -cac_listservers_cache=${cac_listservers_cache-$HOME/tmp/cac_listservers_cache.json} +cac_cache=${cac_cache-$HOME/tmp/cac_listservers_cache.json} cac_secrets=${cac_secrets-$HOME/.secrets/cac} . "$cac_secrets" >/dev/null 2>&1 || : @@ -70,14 +70,14 @@ __cac_cli__console() {( )} __cac_cli__listservers() { - jq -r . $cac_listservers_cache + jq -r . $cac_cache } __cac_cli__update() {( umask 0077 servers=$(_cac_listservers) echo $servers > $cac_listservers_cache.tmp - mv $cac_listservers_cache.tmp $cac_listservers_cache + mv $cac_listservers_cache.tmp $cac_cache )} __cac_cli__getserver() {( @@ -105,7 +105,7 @@ __cac_cli__getserver() {( null end ' \ - $cac_listservers_cache); then + $cac_cache); then echo $result | jq -r . else echo "$0 getserver $k:$v => not unique server found" >&2 @@ -269,12 +269,12 @@ __cac_cli__waitstatus() { } -# XXX for __cac_cli__waitforcacheupdate and __cac_cli__poll cache means $cac_listservers_cache +# XXX for __cac_cli__waitforcacheupdate and __cac_cli__poll cache means $cac_cache # blocks until cache has been updated then executes "$@" __cac_cli__waitforcacheupdate() { - case $(inotifywait --format %f -q -e moved_to $(dirname $cac_listservers_cache)) in - $(basename $cac_listservers_cache)) "$@";; + case $(inotifywait --format %f -q -e moved_to $(dirname $cac_cache)) in + $(basename $cac_cache)) "$@";; *) __cac_cli__waitforcacheupdate "$@";; esac } |