diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ak-ipfs-cat | 4 | ||||
-rwxr-xr-x | bin/ak-zblock-cache | 11 |
2 files changed, 14 insertions, 1 deletions
diff --git a/bin/ak-ipfs-cat b/bin/ak-ipfs-cat index e1e6491..b9bd7ec 100755 --- a/bin/ak-ipfs-cat +++ b/bin/ak-ipfs-cat @@ -1,3 +1,7 @@ #!/bin/bash ipfs --timeout=10s cat $1 +if [ "$?" -ne "0" ] +then + exit 1 +fi 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 |