From ac69832b3a877a4b43b9a75a1f1f9b31cb55abee Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Mon, 26 Aug 2024 19:36:56 +0100 Subject: [PATCH] JAL-3631 Fix interpolatove quotation marks in grep in jalview.sh. Fix some folder name trailing slash checks in macos_install_jalview.sh, add ditto -v and more informative output. --- utils/getdown/bin/jalview.sh | 2 +- utils/install4j/macos-install-jalview.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/getdown/bin/jalview.sh b/utils/getdown/bin/jalview.sh index 04a9144..3880faf 100755 --- a/utils/getdown/bin/jalview.sh +++ b/utils/getdown/bin/jalview.sh @@ -80,7 +80,7 @@ if [ "${ISMACOS}" = 1 ]; then if [ -d "${APPDIR}/jre" ]; then JREDIR="${APPDIR}/jre" elif [ -e "${APPDIR}/installer.properties" ]; then - INSTALLERAPPDIR="$( grep -E '^installer.appdir[[:space:]]*=[[:space:]]*' '${APPDIR}/installer.properties' | sed -E 's/^installer.appdir[[:space:]]*=[[:space:]]*//' )" + INSTALLERAPPDIR="$( grep -E "^installer.appdir[[:space:]]*=[[:space:]]*" "${APPDIR}/installer.properties" | sed -E 's/^installer.appdir[[:space:]]*=[[:space:]]*//' )" if [ -d "${INSTALLERAPPDIR}/jre" ]; then JREDIR="${INSTALLERAPPDIR}/jre" fi diff --git a/utils/install4j/macos-install-jalview.sh b/utils/install4j/macos-install-jalview.sh index 4d2d01b..60dc70c 100755 --- a/utils/install4j/macos-install-jalview.sh +++ b/utils/install4j/macos-install-jalview.sh @@ -252,7 +252,7 @@ APPNAME=$( basename "$APP" ) myecho "Found application '${APP}'" # ensure no trailing slash on APPNAME or APPLICATIONFOLDER (important for rsync) -while [ "${APPLICATIONFOLDER}" != "${APPLICATIONFOLDER%/}" ]; do +while [ "${APPLICATIONFOLDER}" != "${APPLICATIONFOLDER%/}" -a "${APPLICATIONFOLDER}" != "/" ]; do myecho "Removing trailing slash from APPLICATIONFOLDER='${APPLICATIONFOLDER}'" APPLICATIONFOLDER="${APPLICATIONFOLDER%/}" done -- 1.7.10.2