Skip to content
Snippets Groups Projects
Commit 039e0e34 authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

ENH: export OTB_APPLICATION_PATH only if otbenv.profile does not exists

parent c2856ae9
No related branches found
No related tags found
No related merge requests found
......@@ -16,15 +16,6 @@ else
OTB_CLI_LAUNCHER=otbApplicationLauncherCommandLine
fi
# works for install tree
if [ -d "$CURRENT_SCRIPT_DIR/../@OTB_INSTALL_APP_DIR@" ]
then
OTB_APPLICATION_PATH=$CURRENT_SCRIPT_DIR/../@OTB_INSTALL_APP_DIR@:$OTB_APPLICATION_PATH
fi
# export it to make it available to otbApplicationLauncherCommandLine environment
export OTB_APPLICATION_PATH
# avoid numerical issues caused by locale
export LC_NUMERIC=C
......@@ -32,6 +23,13 @@ export LC_NUMERIC=C
# Note that OTB_APPLICATION_PATH is reset here.
if [ -f "$CURRENT_SCRIPT_DIR/../otbenv.profile" ]; then
. "$CURRENT_SCRIPT_DIR/../otbenv.profile"
else
# works for install tree
if [ -d "$CURRENT_SCRIPT_DIR/../@OTB_INSTALL_APP_DIR@" ]; then
OTB_APPLICATION_PATH=$CURRENT_SCRIPT_DIR/../@OTB_INSTALL_APP_DIR@:$OTB_APPLICATION_PATH
fi
# export it to make it available to otbApplicationLauncherCommandLine environment
export OTB_APPLICATION_PATH
fi
# start the application
......
......@@ -16,21 +16,19 @@ else
OTB_GUI_LAUNCHER=otbApplicationLauncherQt
fi
# use the default install tree path for applications
if [ -d "$CURRENT_SCRIPT_DIR/../@OTB_INSTALL_APP_DIR@" ]
then
OTB_APPLICATION_PATH=$CURRENT_SCRIPT_DIR/../@OTB_INSTALL_APP_DIR@:$OTB_APPLICATION_PATH
fi
# export it to make it available to otbApplicationLauncherCommandLine environment
export OTB_APPLICATION_PATH
# avoid numerical issues caused by locale
export LC_NUMERIC=C
# Export GDAL_DATA, EPSG_CSV
if [ -f "$CURRENT_SCRIPT_DIR/../otbenv.profile" ]; then
. "$CURRENT_SCRIPT_DIR/../otbenv.profile"
else
# use the default install tree path for applications
if [ -d "$CURRENT_SCRIPT_DIR/../@OTB_INSTALL_APP_DIR@" ]; then
OTB_APPLICATION_PATH=$CURRENT_SCRIPT_DIR/../@OTB_INSTALL_APP_DIR@:$OTB_APPLICATION_PATH
fi
# export it to make it available to otbApplicationLauncherCommandLine environment
export OTB_APPLICATION_PATH
fi
# start the application
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment