otbcli.sh.in 1008 Bytes
Newer Older
1
#!/bin/sh
2 3 4 5 6 7

#
# Autogenerated by OTB installation process
# DO NOT MODIFY
#

8
CURRENT_SCRIPT_DIR=$(dirname "$0")
9

10
if [ -e "$CURRENT_SCRIPT_DIR/otbApplicationLauncherCommandLine" ]
11 12 13 14 15 16 17 18
then
  # Prefer using the launcher inside the script dir
  OTB_CLI_LAUNCHER=$CURRENT_SCRIPT_DIR/otbApplicationLauncherCommandLine
else
  # Use the one from the PATH
  OTB_CLI_LAUNCHER=otbApplicationLauncherCommandLine
fi

19 20 21
# avoid numerical issues caused by locale
export LC_NUMERIC=C

22 23 24 25
# Export GDAL_DATA, EPSG_CSV
# Note that OTB_APPLICATION_PATH is reset here.
if [ -f "$CURRENT_SCRIPT_DIR/../otbenv.profile" ]; then
    . "$CURRENT_SCRIPT_DIR/../otbenv.profile"
26 27 28 29 30 31 32
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
33 34
fi

35 36
# start the application
$OTB_CLI_LAUNCHER "$@"