lang/ocaml: fix bashisms in tests

This commit is contained in:
rillig 2020-05-23 20:33:51 +00:00
parent e9a28efb6e
commit 1918e27154
2 changed files with 21 additions and 1 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.135 2020/04/15 09:50:54 jaapb Exp $
$NetBSD: distinfo,v 1.136 2020/05/23 20:33:51 rillig Exp $
SHA1 (ocaml-4.09.1.tar.gz) = b4e7140e977c0fae5182074dd93b3c1b74f49ee7
RMD160 (ocaml-4.09.1.tar.gz) = 377e956327bac18a37f9e77b2558e9474fd07481
@ -8,6 +8,7 @@ SHA1 (patch-Makefile) = 132a1cf1187dc05ec5338b496757d89047e91130
SHA1 (patch-Makefile.common.in) = fbf3dc0614073ed5ac9b220211a837f69a4ffcaf
SHA1 (patch-asmcomp_amd64_emit.mlp) = c2b90f50bc3c4bf9817916bdd455a8bfc03cb69b
SHA1 (patch-asmrun_amd64.S) = d4c33cb14c107ed03bf6a3704bbfe7c2799a048e
SHA1 (patch-check-linker-version_sh) = c90242556207242ac58499d7f42519a10aedcca4
SHA1 (patch-configure) = 311b18383bcc88f2a67d83d4b0c6e35344bd2d0d
SHA1 (patch-lex_Makefile) = 18d1b8272ffb3e3a58c26d8a2494aaae6942426a
SHA1 (patch-man_Makefile) = b780c026aef5f7e6b22b142fce3ec87ef9d2ab22

View file

@ -0,0 +1,19 @@
$NetBSD: patch-check-linker-version_sh,v 1.1 2020/05/23 20:33:52 rillig Exp $
Fix bashisms.
--- testsuite/tests/unwind/check-linker-version.sh.orig 2020-03-18 15:02:03.000000000 +0000
+++ testsuite/tests/unwind/check-linker-version.sh 2020-05-02 15:40:01.333410019 +0000
@@ -3,10 +3,10 @@
LDFULL="`ld -v 2>&1`"
LD="`echo $LDFULL | grep -o \"ld64-[0-9]*\"`"
LDVER="`echo $LD | sed \"s/ld64-//\"`"
-if [[ -z "$LD" ]]; then
+if [ -z "$LD" ]; then
echo "unknown linker: pattern ld64-[0-9]* not found in 'ld -v' output";
test_result=${TEST_SKIP};
-elif [[ $LDVER -lt 224 ]]; then
+elif [ $LDVER -lt 224 ]; then
echo "ld version is $LDVER, only 224 or above are supported";
test_result=${TEST_SKIP};
else