diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2023-08-03 20:04:46 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2023-08-03 20:04:46 +0300 |
commit | 67c23e3746159299d5bdd8be03ba94c5d9f2cc3a (patch) | |
tree | 7c7800f5b55bc8db20758d80f066b0345dc4f2fd /bin/ak-zblock-cache | |
parent | b6d3c26ab4d56b8e3c94e99e43c66b1891fb6477 (diff) | |
download | arching-kaos-tools-67c23e3746159299d5bdd8be03ba94c5d9f2cc3a.tar.gz arching-kaos-tools-67c23e3746159299d5bdd8be03ba94c5d9f2cc3a.tar.bz2 arching-kaos-tools-67c23e3746159299d5bdd8be03ba94c5d9f2cc3a.zip |
Fixed the way cache is stored or not
Diffstat (limited to 'bin/ak-zblock-cache')
-rwxr-xr-x | bin/ak-zblock-cache | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/bin/ak-zblock-cache b/bin/ak-zblock-cache index cb0d48f..1e2213f 100755 --- a/bin/ak-zblock-cache +++ b/bin/ak-zblock-cache @@ -13,17 +13,23 @@ then logit "[INFO]" "Cache already there and updated" else logit "[INFO]" "Updating cache" - ak-zblock-show "$1" > $AK_ZBLOCKDIR/$1 + ak-zblock-show "$1" > $AK_CACHEDIR/fzblocks/$1 fi logit "[INFO]" "No cache found. Caching..." - ak-zblock-show "$1" + ak-zblock-show "$1" if [ "$?" -ne "0" ] then logit "[ERROR]" "ak-zblock-show failed..." - exit 1 + exit 2 fi - ak-zblock-show "$1" > $AK_ZBLOCKDIR/$1 + ak-zblock-show "$1" > $AK_CACHEDIR/fzblocks/$1 else + ak-zblock-show "$1" > $AK_CACHEDIR/fzblocks/$1 + if [ "$?" -ne "0" ] + then + logit "[ERROR]" "ak-zblock-show failed..." + exit 2 + fi logit "[ERROR]" "Could not find zblock $1..." exit 1 fi |