JAL-3631 Fix interpolatove quotation marks in grep in jalview.sh. Fix some folder...
authorBen Soares <b.soares@dundee.ac.uk>
Mon, 26 Aug 2024 18:36:56 +0000 (19:36 +0100)
committerBen Soares <b.soares@dundee.ac.uk>
Mon, 26 Aug 2024 18:36:56 +0000 (19:36 +0100)
utils/getdown/bin/jalview.sh
utils/install4j/macos-install-jalview.sh

index 04a9144..3880faf 100755 (executable)
@@ -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
index 4d2d01b..60dc70c 100755 (executable)
@@ -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