Unify error message on missing libDir among all scripts
Unify DIAG_JAVA_OPTS between bat and sh files
Unify details such as quotation among each type of files
Port DIAG_DEBUG and related message from sh to bat files
Change DIAG_JAVA_OPTIONS to DIAG_JAVA_OPTS in bat files
Add /b option to exit in bat files
Test: Run bat files in source
```console
C:\Users\YouheiSakurai\git\support-diagnostics>scripts\diagnostics.bat --help
Diagnostic executable not found:
Please make sure that you are running with the archive ending with
'-dist.zip' in the name and not the one labeled 'Source code'.
Download at https://github.com/elastic/support-diagnostics/releases/latest
C:\Users\YouheiSakurai\git\support-diagnostics>scripts\import-monitoring.bat --help
Diagnostic executable not found:
Please make sure that you are running with the archive ending with
'-dist.zip' in the name and not the one labeled 'Source code'.
Download at https://github.com/elastic/support-diagnostics/releases/latest
C:\Users\YouheiSakurai\git\support-diagnostics>scripts\export-monitoring.bat --help
Diagnostic executable not found:
Please make sure that you are running with the archive ending with
'-dist.zip' in the name and not the one labeled 'Source code'.
Download at https://github.com/elastic/support-diagnostics/releases/latest
C:\Users\YouheiSakurai\git\support-diagnostics>scripts\scrub.bat --help
Diagnostic executable not found:
Please make sure that you are running with the archive ending with
'-dist.zip' in the name and not the one labeled 'Source code'.
Download at https://github.com/elastic/support-diagnostics/releases/latest
```
Test: Run bat files in dist
```console
C:\Users\YouheiSakurai\git\support-diagnostics>diagnostics-8.4.4-SNAPSHOT\diagnostics.bat --help
No Java Home was found. Using current path. If execution fails please install Java and make sure it is in the search path or exposed via the JAVA_HOME environment variable.
Using -Xms256m -Xmx2000m for options.
2023-05-27 04:24:45,370 main ERROR Unable to locate appender "diag" for logger config "root"
SLF4J: Class path contains multiple SLF4J bindings.
...
C:\Users\YouheiSakurai\git\support-diagnostics>diagnostics-8.4.4-SNAPSHOT\import-monitoring.bat --help
No Java Home was found. Using current path. If execution fails please install Java and make sure it is in the search path or exposed via the JAVA_HOME environment variable.
Using -Xms256m -Xmx2000m for options.
2023-05-27 04:25:30,285 main ERROR Unable to locate appender "diag" for logger config "root"
SLF4J: Class path contains multiple SLF4J bindings.
...
C:\Users\YouheiSakurai\git\support-diagnostics>diagnostics-8.4.4-SNAPSHOT\export-monitoring.bat --help
No Java Home was found. Using current path. If execution fails please install Java and make sure it is in the search path or exposed via the JAVA_HOME environment variable.
Using -Xms256m -Xmx2000m for options.
2023-05-27 04:25:56,400 main ERROR Unable to locate appender "diag" for logger config "root"
SLF4J: Class path contains multiple SLF4J bindings.
...
C:\Users\YouheiSakurai\git\support-diagnostics>diagnostics-8.4.4-SNAPSHOT\scrub.bat --help
No Java Home was found. Using current path. If execution fails please install Java and make sure it is in the search path or exposed via the JAVA_HOME environment variable.
Using -Xms8g -Xmx8g for options.
2023-05-27 04:26:15,047 main ERROR Unable to locate appender "diag" for logger config "root"
SLF4J: Class path contains multiple SLF4J bindings.
...
```
Test: Run sh files in source
```console
root@wsl:/mnt/c/Users/YouheiSakurai/git/support-diagnostics# scripts/diagnostics.sh --help
Diagnostic executable not found:
Please make sure that you are running with the archive ending with
'-dist.zip' in the name and not the one labeled 'Source code'.
Download at https://github.com/elastic/support-diagnostics/releases/latest
root@wsl:/mnt/c/Users/YouheiSakurai/git/support-diagnostics# scripts/import-monitoring.sh --help
Diagnostic executable not found:
Please make sure that you are running with the archive ending with
'-dist.zip' in the name and not the one labeled 'Source code'.
Download at https://github.com/elastic/support-diagnostics/releases/latest
root@wsl:/mnt/c/Users/YouheiSakurai/git/support-diagnostics# scripts/export-monitoring.sh --help
Diagnostic executable not found:
Please make sure that you are running with the archive ending with
'-dist.zip' in the name and not the one labeled 'Source code'.
Download at https://github.com/elastic/support-diagnostics/releases/latest
root@wsl:/mnt/c/Users/YouheiSakurai/git/support-diagnostics# scripts/scrub.sh --help
Diagnostic executable not found:
Please make sure that you are running with the archive ending with
'-dist.zip' in the name and not the one labeled 'Source code'.
Download at https://github.com/elastic/support-diagnostics/releases/latest
```
Test: Run bat files in dist
```console
bash-4.4# diagnostics-8.4.4-SNAPSHOT/diagnostics.sh --help
Using /usr/java/openjdk-18/bin/java as Java Runtime
Using -Xms256m -Xmx2000m for options.
2023-05-26 19:30:17,966 main ERROR Unable to locate appender "diag" for logger config "root"
SLF4J: Class path contains multiple SLF4J bindings.
...
bash-4.4# diagnostics-8.4.4-SNAPSHOT/import-monitoring.sh --help
Using /usr/java/openjdk-18/bin/java as Java Runtime
Using -Xms256m -Xmx2000m for options.
2023-05-26 19:30:48,120 main ERROR Unable to locate appender "diag" for logger config "root"
SLF4J: Class path contains multiple SLF4J bindings.
...
bash-4.4# diagnostics-8.4.4-SNAPSHOT/export-monitoring.sh --help
Using /usr/java/openjdk-18/bin/java as Java Runtime
Using -Xms256m -Xmx2000m for options.
2023-05-26 19:31:07,463 main ERROR Unable to locate appender "diag" for logger config "root"
SLF4J: Class path contains multiple SLF4J bindings.
...
bash-4.4# diagnostics-8.4.4-SNAPSHOT/scrub.sh --help
Using /usr/java/openjdk-18/bin/java as Java Runtime
Using -Xms8g -Xmx8g for options.
2023-05-26 19:31:29,387 main ERROR Unable to locate appender "diag" for logger config "root"
SLF4J: Class path contains multiple SLF4J bindings.
...
```
Test: Run bat files in source
```console C:\Users\YouheiSakurai\git\support-diagnostics>scripts\diagnostics.bat --help Diagnostic executable not found: Please make sure that you are running with the archive ending with '-dist.zip' in the name and not the one labeled 'Source code'. Download at https://github.com/elastic/support-diagnostics/releases/latest C:\Users\YouheiSakurai\git\support-diagnostics>scripts\import-monitoring.bat --help Diagnostic executable not found: Please make sure that you are running with the archive ending with '-dist.zip' in the name and not the one labeled 'Source code'. Download at https://github.com/elastic/support-diagnostics/releases/latest C:\Users\YouheiSakurai\git\support-diagnostics>scripts\export-monitoring.bat --help Diagnostic executable not found: Please make sure that you are running with the archive ending with '-dist.zip' in the name and not the one labeled 'Source code'. Download at https://github.com/elastic/support-diagnostics/releases/latest C:\Users\YouheiSakurai\git\support-diagnostics>scripts\scrub.bat --help Diagnostic executable not found: Please make sure that you are running with the archive ending with '-dist.zip' in the name and not the one labeled 'Source code'. Download at https://github.com/elastic/support-diagnostics/releases/latest ```Test: Run bat files in dist
```console C:\Users\YouheiSakurai\git\support-diagnostics>diagnostics-8.4.4-SNAPSHOT\diagnostics.bat --help No Java Home was found. Using current path. If execution fails please install Java and make sure it is in the search path or exposed via the JAVA_HOME environment variable. Using -Xms256m -Xmx2000m for options. 2023-05-27 04:24:45,370 main ERROR Unable to locate appender "diag" for logger config "root" SLF4J: Class path contains multiple SLF4J bindings. ... C:\Users\YouheiSakurai\git\support-diagnostics>diagnostics-8.4.4-SNAPSHOT\import-monitoring.bat --help No Java Home was found. Using current path. If execution fails please install Java and make sure it is in the search path or exposed via the JAVA_HOME environment variable. Using -Xms256m -Xmx2000m for options. 2023-05-27 04:25:30,285 main ERROR Unable to locate appender "diag" for logger config "root" SLF4J: Class path contains multiple SLF4J bindings. ... C:\Users\YouheiSakurai\git\support-diagnostics>diagnostics-8.4.4-SNAPSHOT\export-monitoring.bat --help No Java Home was found. Using current path. If execution fails please install Java and make sure it is in the search path or exposed via the JAVA_HOME environment variable. Using -Xms256m -Xmx2000m for options. 2023-05-27 04:25:56,400 main ERROR Unable to locate appender "diag" for logger config "root" SLF4J: Class path contains multiple SLF4J bindings. ... C:\Users\YouheiSakurai\git\support-diagnostics>diagnostics-8.4.4-SNAPSHOT\scrub.bat --help No Java Home was found. Using current path. If execution fails please install Java and make sure it is in the search path or exposed via the JAVA_HOME environment variable. Using -Xms8g -Xmx8g for options. 2023-05-27 04:26:15,047 main ERROR Unable to locate appender "diag" for logger config "root" SLF4J: Class path contains multiple SLF4J bindings. ... ```Test: Run sh files in source
```console root@wsl:/mnt/c/Users/YouheiSakurai/git/support-diagnostics# scripts/diagnostics.sh --help Diagnostic executable not found: Please make sure that you are running with the archive ending with '-dist.zip' in the name and not the one labeled 'Source code'. Download at https://github.com/elastic/support-diagnostics/releases/latest root@wsl:/mnt/c/Users/YouheiSakurai/git/support-diagnostics# scripts/import-monitoring.sh --help Diagnostic executable not found: Please make sure that you are running with the archive ending with '-dist.zip' in the name and not the one labeled 'Source code'. Download at https://github.com/elastic/support-diagnostics/releases/latest root@wsl:/mnt/c/Users/YouheiSakurai/git/support-diagnostics# scripts/export-monitoring.sh --help Diagnostic executable not found: Please make sure that you are running with the archive ending with '-dist.zip' in the name and not the one labeled 'Source code'. Download at https://github.com/elastic/support-diagnostics/releases/latest root@wsl:/mnt/c/Users/YouheiSakurai/git/support-diagnostics# scripts/scrub.sh --help Diagnostic executable not found: Please make sure that you are running with the archive ending with '-dist.zip' in the name and not the one labeled 'Source code'. Download at https://github.com/elastic/support-diagnostics/releases/latest ```Test: Run bat files in dist
```console bash-4.4# diagnostics-8.4.4-SNAPSHOT/diagnostics.sh --help Using /usr/java/openjdk-18/bin/java as Java Runtime Using -Xms256m -Xmx2000m for options. 2023-05-26 19:30:17,966 main ERROR Unable to locate appender "diag" for logger config "root" SLF4J: Class path contains multiple SLF4J bindings. ... bash-4.4# diagnostics-8.4.4-SNAPSHOT/import-monitoring.sh --help Using /usr/java/openjdk-18/bin/java as Java Runtime Using -Xms256m -Xmx2000m for options. 2023-05-26 19:30:48,120 main ERROR Unable to locate appender "diag" for logger config "root" SLF4J: Class path contains multiple SLF4J bindings. ... bash-4.4# diagnostics-8.4.4-SNAPSHOT/export-monitoring.sh --help Using /usr/java/openjdk-18/bin/java as Java Runtime Using -Xms256m -Xmx2000m for options. 2023-05-26 19:31:07,463 main ERROR Unable to locate appender "diag" for logger config "root" SLF4J: Class path contains multiple SLF4J bindings. ... bash-4.4# diagnostics-8.4.4-SNAPSHOT/scrub.sh --help Using /usr/java/openjdk-18/bin/java as Java Runtime Using -Xms8g -Xmx8g for options. 2023-05-26 19:31:29,387 main ERROR Unable to locate appender "diag" for logger config "root" SLF4J: Class path contains multiple SLF4J bindings. ... ```