diff options
| -rwxr-xr-x | type/__dtnrch_install4j/gencode-remote | 15 | ||||
| -rw-r--r-- | type/__dtnrch_install4j/man.rst | 10 | ||||
| -rw-r--r-- | type/__dtnrch_install4j/parameter/optional_multiple | 2 |
3 files changed, 27 insertions, 0 deletions
diff --git a/type/__dtnrch_install4j/gencode-remote b/type/__dtnrch_install4j/gencode-remote index 6e138e7..3e8a8b3 100755 --- a/type/__dtnrch_install4j/gencode-remote +++ b/type/__dtnrch_install4j/gencode-remote @@ -48,10 +48,20 @@ in (present) printf 'set -e\n' + if test -s "${__object:?}/parameter/env" + then + while read -r _i4jenv + do + target_setenv "${_i4jenv%%=*}" "${_i4jenv#*=}" + done <"${__object:?}/parameter/env" + unset -v _i4jenv + fi + if test -s "${__object:?}/parameter/java-home" then java_home=$(cat "${__object:?}/parameter/java-home") + target_setenv INSTALL4J_DISABLE_BUNDLED_JRE true target_setenv INSTALL4J_JAVA_HOME "${java_home}" target_setenv INSTALL4J_JAVA_HOME_OVERRIDE "${java_home}" i4j_opts="${i4j_opts} -manual $(quote "${java_home}")" @@ -75,6 +85,11 @@ in i4j_opts="${i4j_opts} -overwrite" fi + if test -s "${__object:?}/parameter/response" + then + i4j_opts="${i4j_opts} -varfile \"\${__object:?}/parameter/response\"" + fi + # Prepare installer if expr "${i4j_installer}" : '.*\.sh$' >/dev/null then diff --git a/type/__dtnrch_install4j/man.rst b/type/__dtnrch_install4j/man.rst index 1542ceb..01a91ee 100644 --- a/type/__dtnrch_install4j/man.rst +++ b/type/__dtnrch_install4j/man.rst @@ -27,6 +27,12 @@ installer OPTIONAL PARAMETERS ------------------- +env + Pass an environment variable to the install4j installer. + + This parameter takes a value of the form ``var=value``. + + Can be used multiple times to specify multiple environment variables. install-dir The directory to which the application should be installed. @@ -37,6 +43,10 @@ java-home This will override the default JRE search sequence of install4j. Not all installers respect this option. +response + Provide a response to the install4j installer (cf. ``-varfile``). + + Can be used multiple times to specify multiple responses. state One of: diff --git a/type/__dtnrch_install4j/parameter/optional_multiple b/type/__dtnrch_install4j/parameter/optional_multiple new file mode 100644 index 0000000..c8a1bb3 --- /dev/null +++ b/type/__dtnrch_install4j/parameter/optional_multiple @@ -0,0 +1,2 @@ +env +response |
