From cfe583f4b379319e60519d34430e460f3599d6a5 Mon Sep 17 00:00:00 2001 From: Jiri Date: Wed, 17 Apr 2024 17:13:35 +0200 Subject: [PATCH] Make detection if readlink -f is really working --- run.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/run.sh b/run.sh index 5f9c1d7..97ffcc0 100755 --- a/run.sh +++ b/run.sh @@ -30,6 +30,8 @@ case "$OS" in ;; esac +READLINK_F="-f" +readlink $READLINK_F "." || READLINK_F="" envVarArg="-e:CUSTOM_DUMMY_VARIABLE=true,JAVA_TOOL_OPTIONS,OTOOL_BUILD_ARCH,DISPLAY" keys=$(env | grep OTOOL_ | sed "s/=.*//") @@ -51,7 +53,7 @@ if [ "x$CYGWIN" == "xtrue" ] ; then fi if [ "x$JAVA_HOME" == "x" ] ; then - JAVA_HOME="$(dirname $(dirname $(readlink -f $(which javac))))" + JAVA_HOME="$(dirname $(dirname $(readlink $READLINK_F $(which javac))))" fi if [ "x$CYGWIN" == "xtrue" ] ; then @@ -141,7 +143,7 @@ tar -czf test.${TIME}.tar.gz "${jtWork}" "${jtReport}" || echo "Packing of resul popd -if [ ! `readlink -f ${SCRIPT_DIR}` == `pwd` ] ; then +if [ ! `readlink $READLINK_F ${SCRIPT_DIR}` == `pwd` ] ; then mv ${SCRIPT_DIR}/test.${TIME} . mv -v ${SCRIPT_DIR}/test.${TIME}.tar.gz . || echo "Moving of results tarball failed" fi