From: Sven Roederer Date: Wed, 25 Dec 2019 17:39:00 +0000 (+0100) Subject: base-files: remove some bashisms X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0fecc997f88b7f0a44c0f724d6de30083a14b908;p=openwrt%2Fstaging%2Fyousong.git base-files: remove some bashisms "[[" is a bash extension for test. As the ash-implementation is not fully compatible we drop its usage. Also change to "=" for simple test, which is sufficient. (see d6ac8ca76c04ed) Signed-off-by: Sven Roederer [split patch, removed shebang] Signed-off-by: Adrian Schmutzler --- diff --git a/package/base-files/files/lib/functions/caldata.sh b/package/base-files/files/lib/functions/caldata.sh index 1ff69ce1ae..3bdb1e4dd5 100644 --- a/package/base-files/files/lib/functions/caldata.sh +++ b/package/base-files/files/lib/functions/caldata.sh @@ -69,7 +69,7 @@ caldata_valid() { local expected="$1" magic=$(hexdump -v -n 2 -e '1/1 "%02x"' /lib/firmware/$FIRMWARE) - [[ "$magic" == "$expected" ]] + [ "$magic" = "$expected" ] return $? }