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
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