[krbdev.mit.edu #8955] nonportable contsruct in shell script
Greg Troxel via RT
rt-comment at krbdev.mit.edu
Thu Oct 8 02:14:32 EDT 2020
Thu Oct 08 02:14:32 2020: Request 8955 was acted upon.
Transaction: Ticket created by gdt at lexort.com
Queue: krb5
Subject: nonportable contsruct in shell script
Owner: Nobody
Requestors: gdt at lexort.com
Status: new
Ticket <URL: https://krbdev.mit.edu/rt/Ticket/Display.html?id=8955 >
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://mailman.mit.edu/pipermail/krb5-bugs/attachments/20201008/b93b8fcc/attachment.bin
More information about the krb5-bugs
mailing list