From 67c23e3746159299d5bdd8be03ba94c5d9f2cc3a Mon Sep 17 00:00:00 2001 From: kaotisk Date: Thu, 3 Aug 2023 20:04:46 +0300 Subject: Fixed the way cache is stored or not --- bin/ak-zblock-cache | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'bin') 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 -- cgit v1.2.3