Merge pull request #2019 from Unidata/gh2018.wif

Fixes portability issue with how echo was used in a shell script
This commit is contained in:
Ward Fisher 2021-06-11 12:09:42 -06:00 committed by GitHub
commit cd39b9d2d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -10,7 +10,7 @@ add_definitions(-D"TOPBINDIR=${CMAKE_CURRENT_BINARY_DIR}/../")
remove_definitions(-DDLL_EXPORT)
# add_definitions(-D"TOPSRCDIR=${CMAKE_CURRENT_SOURCE_DIR}")
FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.sh)
FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.sh ${CMAKE_CURRENT_SOURCE_DIR}/ref_pathcvt.txt)
FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE)

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
. ../test_common.sh
@ -11,6 +11,7 @@ P="$2"
echo -n "path: $T: |$P| => |" >>tmp_pathcvt.txt
${execdir}/pathcvt "$T" -e "$P" >>tmp_pathcvt.txt
echo "|" >> tmp_pathcvt.txt
}
testcase() {
@ -18,7 +19,7 @@ testcase() {
testcase1 "-c" "$1"
testcase1 "-m" "$1"
testcase1 "-w" "$1"
}
}
rm -f tmp_pathcvt.txt