Skip to content

Commit

Permalink
close torakiki#335: launch scripts should check PDFSAM_JAVA_PATH exis…
Browse files Browse the repository at this point in the history
…tence, not just if it's defined
  • Loading branch information
torakiki committed Jan 1, 2019
1 parent 7cb5e06 commit 0d883bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pdfsam-basic/src/assembly/resources/bin/pdfsam.bat
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ for %%i in ("%~dp0..") do set "BASEDIR=%%~fi"
:repoSetup
set "RUNTIME=%BASEDIR%\runtime"

if DEFINED PDFSAM_JAVA_PATH (
if exist "%PDFSAM_JAVA_PATH%" (
set "JAVACMD=%PDFSAM_JAVA_PATH%\bin\java"
) else (
if exist "%RUNTIME%" (
Expand Down
2 changes: 1 addition & 1 deletion pdfsam-basic/src/assembly/resources/bin/pdfsam.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ PRGDIR=`dirname "$PRG"`
BASEDIR=`cd "$PRGDIR/.." >/dev/null; pwd`
RUNTIME="$BASEDIR"/runtime

if [ -z "$PDFSAM_JAVA_PATH" ]; then
if [ ! -d "$PDFSAM_JAVA_PATH" ]; then
# the rutime is supplied
if [ -d "$RUNTIME" ]; then
JAVA_HOME="$RUNTIME"
Expand Down

0 comments on commit 0d883bc

Please sign in to comment.