declare -a JARPATHS=()
if [ -e "${GETDOWNTXT}" ]; then
# always check grep and sed regexes on macos -- they're not the same
- for JAR in $(grep -e '^code\s*=\s*' "${GETDOWNTXT}" | sed -e 's/^code\s*=\s*//;'); do
+for JAR in $(grep -e '^code[[:space:]]*=[[:space:]]*' "${GETDOWNTXT}" | while read -r line; do echo $line | sed -E -e 's/code[[:space:]]*=[[:space:]]*//;'; done);
+ do
[ -n "${CLASSPATH}" ] && CLASSPATH="${CLASSPATH}:"
CLASSPATH="${CLASSPATH}${APPDIR}/${JAR}"
JARPATHS=( "${JARPATHS[@]}" "${APPDIR}/${JAR}" )
COLUMNS=$(resize -u | grep COLUMNS= | sed -e 's/.*=//;s/;//') 2>/dev/null
fi
JVMARGS=( "${JVMARGS[@]}" "-DCONSOLEWIDTH=${COLUMNS}" )
+JVMARGS=( "${JVMARGS[@]}" "-Dgetdownappdir=${APPDIR}" )
# Is there a bundled Java? If not just try one in the PATH (do need .exe in WSL)
if [ \! -e "${JAVA}" ]; then