diff --git a/test/compile-test.sh b/test/compile-test.sh index 9a2f5e0..854d527 100755 --- a/test/compile-test.sh +++ b/test/compile-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/sh # # Copyright (C) 2017 - 2022, Stephan Mueller # diff --git a/test/hasher-test.sh b/test/hasher-test.sh index c90fcc9..bfeab44 100755 --- a/test/hasher-test.sh +++ b/test/hasher-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/sh # # Copyright (C) 2017 - 2022, Stephan Mueller # @@ -304,7 +304,7 @@ done # function expand_string() { - if [[ "$1" == 0x* ]] + if [ "$1" == 0x* ] then printf "$(echo -n "${1#0x}" | sed 's/\(..\)/\\x\1/g')" else diff --git a/test/kcapi-convenience.sh b/test/kcapi-convenience.sh index d1cb110..d4ca19e 100755 --- a/test/kcapi-convenience.sh +++ b/test/kcapi-convenience.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/sh # # Copyright (C) 2017 - 2022, Stephan Mueller # diff --git a/test/kcapi-dgst-test.sh b/test/kcapi-dgst-test.sh index 0ad5ed3..00b3e8a 100755 --- a/test/kcapi-dgst-test.sh +++ b/test/kcapi-dgst-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/sh # # Copyright (C) 2017 - 2022, Stephan Mueller # diff --git a/test/kcapi-enc-test-large.sh b/test/kcapi-enc-test-large.sh index 4a244d9..d464f14 100755 --- a/test/kcapi-enc-test-large.sh +++ b/test/kcapi-enc-test-large.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/sh # # Copyright (C) 2017 - 2022, Stephan Mueller # diff --git a/test/kcapi-enc-test.sh b/test/kcapi-enc-test.sh index 3ace39c..e788dbd 100755 --- a/test/kcapi-enc-test.sh +++ b/test/kcapi-enc-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/sh # # Copyright (C) 2017 - 2022, Stephan Mueller # diff --git a/test/kcapi-fuzz-test.sh b/test/kcapi-fuzz-test.sh index c44d30b..51f968a 100755 --- a/test/kcapi-fuzz-test.sh +++ b/test/kcapi-fuzz-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/sh # # Copyright (C) 2017 - 2022, Stephan Mueller # diff --git a/test/libtest.sh b/test/libtest.sh index 74ff8ce..cd6198b 100644 --- a/test/libtest.sh +++ b/test/libtest.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/sh # # Copyright (C) 2017 - 2022, Stephan Mueller # @@ -74,7 +74,7 @@ color() { bg=0 echo -ne "\033[0m" - while [[ $# -gt 0 ]]; do + while [ $# -gt 0 ]; do code=0 case $1 in black) code=30 ;; @@ -90,7 +90,9 @@ color() reset|off|default) code=0 ;; bold|bright) code=1 ;; esac - [[ $code == 0 ]] || echo -ne "\033[$(printf "%02d" $((code+bg)))m" + if [ $code == 0 ]; then + echo -ne "\033[$(printf "%02d" $((code+bg)))m" + fi shift done } diff --git a/test/test-invocation.sh b/test/test-invocation.sh index 61c0a3d..197234a 100755 --- a/test/test-invocation.sh +++ b/test/test-invocation.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/sh # # Copyright (C) 2016 - 2022, Stephan Mueller # diff --git a/test/test.sh b/test/test.sh index b889335..13636e8 100755 --- a/test/test.sh +++ b/test/test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/sh # # Copyright (C) 2014 - 2022, Stephan Mueller # diff --git a/test/virttest.sh b/test/virttest.sh index c3c77be..c717111 100755 --- a/test/virttest.sh +++ b/test/virttest.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/sh # # Copyright (C) 2017 - 2022, Stephan Mueller #