Skip to content

Commit

Permalink
Make detection if readlink -f is really working
Browse files Browse the repository at this point in the history
  • Loading branch information
judovana committed Apr 18, 2024
1 parent ecd15ac commit b7d8811
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/=.*//")
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b7d8811

Please sign in to comment.