diff options
Diffstat (limited to 'cac')
-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 } |