summaryrefslogtreecommitdiffstats
path: root/cac
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-08-05 21:06:19 +0200
committertv <tv@shackspace.de>2015-08-05 21:08:58 +0200
commit6d1553b092da48df6894e36f6ee95dcaafce5f84 (patch)
tree1aae33ab700e3e6833656db74ad35425004706e4 /cac
parent20556f00927ccc39b23b99e04a0db0a942fa7172 (diff)
cac: rename cac{_listservers,}_cache
Diffstat (limited to 'cac')
-rwxr-xr-xcac14
1 files changed, 7 insertions, 7 deletions
diff --git a/cac b/cac
index 867c58f..985ca0e 100755
--- a/cac
+++ b/cac
@@ -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
}