Skip to content

Commit b58577c

Browse files
committed
more precise tests
1 parent 352eb11 commit b58577c

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

examples/scripts/post_install.sh

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ test "${CUSTOM_VARIABLE_1}" = 'FIR$T-CUSTOM_'\''STRING'\'' WITH SPACES AND @*! "
2121
# shellcheck disable=SC2016 # String interpolation disabling is deliberate
2222
test "${CUSTOM_VARIABLE_2}" = '$ECOND-CUSTOM_'\''STRING'\'' WITH SPACES AND @*! "CHARACTERS"'
2323

24+
if [[ "${INSTALLER_TYPE}" == "SH" ]]; then
25+
test "${INSTALLER_UNATTENDED}" = "1"
26+
fi
27+
2428
if [[ $(uname -s) == Linux ]]; then
2529
if [[ ${INSTALLER_PLAT} != linux-* ]]; then
2630
exit 1

examples/scripts/pre_install.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ if not "%INSTALLER_NAME%" == "Scripts" exit 1
22
if not "%INSTALLER_VER%" == "X" exit 1
33
if not "%INSTALLER_PLAT%" == "win-64" exit 1
44
if not "%INSTALLER_TYPE%" == "EXE" exit 1
5-
if "%INSTALLER_UNATTENDED%" == "" exit 1
5+
if not "%INSTALLER_UNATTENDED%" == "1" exit 1
66
if "%PREFIX%" == "" exit 1
77
if not "%CUSTOM_VARIABLE_1%" == "FIR$T-CUSTOM_STRING WITH SPACES AND @*! CHARACTERS" exit 1
88
if not "%CUSTOM_VARIABLE_2%" == "$ECOND-CUSTOM_STRING WITH SPACES AND @*! CHARACTERS" exit 1

examples/scripts/pre_install.sh

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ test "${CUSTOM_VARIABLE_1}" = 'FIR$T-CUSTOM_'\''STRING'\'' WITH SPACES AND @*! "
1818
# shellcheck disable=SC2016 # String interpolation disabling is deliberate
1919
test "${CUSTOM_VARIABLE_2}" = '$ECOND-CUSTOM_'\''STRING'\'' WITH SPACES AND @*! "CHARACTERS"'
2020

21+
if [[ "${INSTALLER_TYPE}" == "SH" ]]; then
22+
test "${INSTALLER_UNATTENDED}" = "1"
23+
fi
24+
2125
if [[ $(uname -s) == Linux ]]; then
2226
if [[ ${INSTALLER_PLAT} != linux-* ]]; then
2327
exit 1

0 commit comments

Comments
 (0)