mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-30 16:47:43 +08:00
GP-6193: Environment variables can now be set in launch.properties using ENVVARS= or ENVVARS_[PLATFORM]=
This commit is contained in:
@@ -43,9 +43,9 @@ function showUsage() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
VMARGS_FROM_CALLER= # Passed in from the outer script as one long string, no spaces
|
||||
VMARGS_FROM_LAUNCH_SH=() # Defined in this script, added to array
|
||||
VMARGS_FROM_LAUNCH_PROPS=() # Retrieved from LaunchSupport, added to array
|
||||
VMARGS_FROM_CALLER= # Passed in from the outer script as one long string, no spaces
|
||||
VMARGS_FROM_LAUNCH_SH=() # Defined in this script, added to array
|
||||
VMARGS_FROM_LAUNCH_PROPS=() # Retrieved from LaunchSupport, added to array
|
||||
|
||||
ARGS=()
|
||||
INDEX=0
|
||||
@@ -169,6 +169,15 @@ if [ ! $? -eq 0 ]; then
|
||||
fi
|
||||
JAVA_CMD="${LS_JAVA_HOME}/bin/java"
|
||||
|
||||
# Get the configurable environment variables from the launch properties
|
||||
# Only set them if they are currently unset or empty
|
||||
while IFS=$'\r\n' read -r line; do
|
||||
IFS='=' read -r key value <<< "$line"
|
||||
if [ -z ${!key} ]; then
|
||||
export $key=$value
|
||||
fi
|
||||
done < <("${JAVA_CMD}" -cp "${LS_CPATH}" LaunchSupport "${INSTALL_DIR}" -envvars)
|
||||
|
||||
# Get the configurable VM arguments from the launch properties
|
||||
while IFS=$'\r\n' read -r line; do
|
||||
VMARGS_FROM_LAUNCH_PROPS+=("$line")
|
||||
|
||||
Reference in New Issue
Block a user