Replace string comparisons with integer comparisons

checkbashisms reports Bash-style ("==") string comparisons inside test/[
command:

    possible bashism in bin/tests/system/checkconf/tests.sh line 105 (should be 'b = a'):
                    if [ $? == 0 ]; then echo_i "failed"; ret=1; fi
    possible bashism in bin/tests/system/keyfromlabel/tests.sh line 62 (should be 'b = a'):
                    test $ret == 0 || continue
    possible bashism in bin/tests/system/keyfromlabel/tests.sh line 79 (should be 'b = a'):
                    test $ret == 0 || continue
This commit is contained in:
Michal Nowak
2022-08-02 15:07:49 +02:00
parent 9e68997cbb
commit 7640fc5b39
2 changed files with 66 additions and 66 deletions

View File

@@ -59,7 +59,7 @@ do
status=$((status+ret))
# Skip dnssec-keyfromlabel if key generation failed.
test $ret == 0 || continue
test $ret -eq 0 || continue
echo_i "Get ZSK $alg $zone $type:$bits"
ret=0
@@ -76,7 +76,7 @@ do
status=$((status+ret))
# Skip signing if dnssec-keyfromlabel failed.
test $ret == 0 || continue
test $ret -eq 0 || continue
echo_i "Sign zone with $ksk $zsk"
ret=0