diff --git a/CMake/otbcli_app.sh.in b/CMake/otbcli_app.sh.in index f24399ea9e8e761980d72c3d8ea76042f11c87c6..ddad53620e126c383c64cd6f4d6aa38f5ca771f2 100644 --- a/CMake/otbcli_app.sh.in +++ b/CMake/otbcli_app.sh.in @@ -10,11 +10,13 @@ CURRENT_SCRIPT_DIR=`dirname $0` if [ -e $CURRENT_SCRIPT_DIR/otbcli ] then # Prefer using the launcher inside the script dir - OTB_CLI_LAUNCHER=$CURRENT_SCRIPT_DIR/otbcli + OTB_CLI_LAUNCHER=./otbcli else # Use the one from the PATH OTB_CLI_LAUNCHER=otbcli fi +cd $CURRENT_SCRIPT_DIR + # start the application $OTB_CLI_LAUNCHER @APPLICATION_NAME@ "$@"