Skip to content

Commit fdc329f

Browse files
authored
Check for source distribution (#374)
Displays error message and exits if it cannot find the lib directory created when building the runtime distribution. closes #203
1 parent c4dba02 commit fdc329f

File tree

8 files changed

+55
-0
lines changed

8 files changed

+55
-0
lines changed

scripts/diagnostics.bat

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@ setlocal enabledelayedexpansion
33

44
SET scriptpath=%~dp0
55
SET diagpath=%scriptpath:~0,-1%
6+
SET libpath=%diagpath%\lib\NUL
67

8+
IF NOT EXIST %libpath% (
9+
ECHO "Runtimes library does not exist - make sure you are running the "
10+
ECHO "archive with 'dist' in the name, not the one labeled: 'source'."
11+
EXIT
12+
)
713
set JAVA_EXEC=java
814
if not defined JAVA_HOME (
915
set JAVA_EXEC=java

scripts/diagnostics.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
scriptDir=$0
44
scriptDir=${scriptDir/\/diagnostics.sh/$''}
5+
libDir=$scriptDir'/lib'
6+
7+
if [ -d "libDir" ]; then
8+
echo "Runtimes library does not exist - make sure you are running the "
9+
echo "archive with 'dist-' in the name, not the one labeled: 'source'."
10+
exit
11+
fi
512

613
if [ -x "$JAVA_HOME/bin/java" ]; then
714
JAVA="$JAVA_HOME/bin/java"

scripts/export-monitoring.bat

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ setlocal enabledelayedexpansion
33

44
SET scriptpath=%~dp0
55
SET diagpath=%scriptpath:~0,-1%
6+
SET libpath=%diagpath%\lib\NUL
7+
8+
IF NOT EXIST %libpath% (
9+
ECHO "Runtimes library does not exist - make sure you are running the "
10+
ECHO "archive with 'dist' in the name, not the one labeled: 'source'."
11+
EXIT
12+
)
613

714
set JAVA_EXEC=java
815
if not defined JAVA_HOME (

scripts/export-monitoring.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
scriptDir=$0
44
scriptDir=${scriptDir/\/export-monitoring.sh/$''}
5+
libDir=$scriptDir'/lib'
6+
7+
if [ -d "libDir" ]; then
8+
echo "Runtimes library does not exist - make sure you are running the "
9+
echo "archive with 'dist' in the name, not the one labeled: 'source'."
10+
exit
11+
fi
512

613
if [ -x "$JAVA_HOME/bin/java" ]; then
714
JAVA="$JAVA_HOME/bin/java"

scripts/import-monitoring.bat

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ setlocal enabledelayedexpansion
33

44
SET scriptpath=%~dp0
55
SET diagpath=%scriptpath:~0,-1%
6+
SET libpath=%diagpath%\lib\NUL
7+
8+
IF NOT EXIST %libpath% (
9+
ECHO "Runtimes library does not exist - make sure you are running the "
10+
ECHO "archive with 'dist' in the name, not the one labeled: 'source'."
11+
EXIT
12+
)
613

714
set JAVA_EXEC=java
815
if not defined JAVA_HOME (

scripts/import-monitoring.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
scriptDir=$0
44
scriptDir=${scriptDir/\/import-monitoring.sh/$''}
5+
libDir=$scriptDir'/lib'
6+
7+
if [ -d "libDir" ]; then
8+
echo "Runtimes library does not exist - make sure you are running the "
9+
echo "archive with 'dist' in the name, not the one labeled: 'source'."
10+
exit
11+
fi
512

613
if [ -x "$JAVA_HOME/bin/java" ]; then
714
JAVA="$JAVA_HOME/bin/java"

scripts/scrub.bat

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ setlocal enabledelayedexpansion
33

44
SET scriptpath=%~dp0
55
SET diagpath=%scriptpath:~0,-1%
6+
SET libpath=%diagpath%\lib\NUL
7+
8+
IF NOT EXIST %libpath% (
9+
ECHO "Runtimes library does not exist - make sure you are running the "
10+
ECHO "archive with 'dist' in the name, not the one labeled: 'source'."
11+
EXIT
12+
)
613

714
set JAVA_EXEC=java
815
if not defined JAVA_HOME (

scripts/scrub.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
scriptDir=$0
44
scriptDir=${scriptDir/\/scrub.sh/$''}
5+
libDir=$scriptDir'/lib'
6+
7+
if [ -d "libDir" ]; then
8+
echo "Runtimes library does not exist - make sure you are running the "
9+
echo "archive with 'dist-' in the name, not the one labeled: 'source'."
10+
exit
11+
fi
512

613
if [ -x "$JAVA_HOME/bin/java" ]; then
714
JAVA="$JAVA_HOME/bin/java"

0 commit comments

Comments
 (0)