Date: | Wed, 07 Oct 2020 20:21:26 -0400 |
CC: | "Greg Troxel" <gdt@lexort.com> |
From: | "Greg Troxel" <gdt@lexort.com> |
To: | krb5-bugs@mit.edu |
Subject: | nonportable contsruct in shell script |
I help maintain the mit-krb5 package for pgksrc, used on NetBSD.
We have applied the following patch because test_ccapi.sh is a shell
script (with #!/bin/sh) but contains code not permitted by the POSIX
shell standard. (The syntax "[[" is a bash extension.)
Also, my editor appears to have added a missing final newline; that's a
bug in the patch, but something that would be nice to fix too.
Thanks,
Greg
$NetBSD: patch-ccapi_test_test__ccapi.sh,v 1.1 2020/10/05 23:24:45 gdt Exp $
--- ccapi/test/test_ccapi.sh.orig 2020-02-12 17:21:58.000000000 +0000
+++ ccapi/test/test_ccapi.sh
@@ -6,7 +6,7 @@ TEST_DIR="tests"
failure_count=0
function run_test {
- if [[ -e $TEST_DIR/$1 ]]; then
+ if [ -e "$TEST_DIR/$1" ]; then
./$TEST_DIR/$1
failure_count=`expr $failure_count + $?`
fi
@@ -73,4 +73,4 @@ run_test test_cc_get_NC_info
printf "\nFinished testing CCAPI. $failure_count failures in total.\n"
-exit 0
\ No newline at end of file
+exit 0
Message body not shown because it is not plain text.