diff options
Diffstat (limited to 'bin/ak-find-latest-mined-sblock')
-rwxr-xr-x | bin/ak-find-latest-mined-sblock | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/ak-find-latest-mined-sblock b/bin/ak-find-latest-mined-sblock index effe1bb..74fa919 100755 --- a/bin/ak-find-latest-mined-sblock +++ b/bin/ak-find-latest-mined-sblock @@ -21,12 +21,12 @@ further(){ lookfor(){ echo -n $1 | grep -e '[0-9a-f]\{128\}' > /dev/null - if [ ! $? = 0 ] + if [ $? -ne 0 ] then _ak_log_error "Oops!!! The argument passed, does not match the regular expression!" else counters[$CHAIN_PARENT]="$(expr ${counters[$CHAIN_PARENT]} + 1)" - if [ ! $? = 0 ] + if [ $? -ne 0 ] then echo "$1, $counters[$1]" exit 1 @@ -35,7 +35,7 @@ lookfor(){ # echo "$1 file:" # cat "$1" | jq NEXT_TARGET="$(cat "$1" | jq | grep previous | tr -d ' ' | sed -e 's/previous//g; s/[",:]//g;')" - if [ ! "$NEXT_TARGET" = "" ] + if [ -n "$NEXT_TARGET" ] then _ak_log_info "Found previous: $NEXT_TARGET" if [ ! -f "$NEXT_TARGET" ] |