diff options
Diffstat (limited to 'bin/ak-zblock-cache')
-rwxr-xr-x | bin/ak-zblock-cache | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/bin/ak-zblock-cache b/bin/ak-zblock-cache index 6d11cde..cb0d48f 100755 --- a/bin/ak-zblock-cache +++ b/bin/ak-zblock-cache @@ -16,11 +16,20 @@ then ak-zblock-show "$1" > $AK_ZBLOCKDIR/$1 fi logit "[INFO]" "No cache found. Caching..." + ak-zblock-show "$1" + if [ "$?" -ne "0" ] + then + logit "[ERROR]" "ak-zblock-show failed..." + exit 1 + fi ak-zblock-show "$1" > $AK_ZBLOCKDIR/$1 + else + logit "[ERROR]" "Could not find zblock $1..." + exit 1 fi exit 0 else - echo not ok + printf "Usage:\n\t%s <zblock-ipfs-hash>\n" "$PROGRAM" 1>&2 exit 1 fi |