Commit aa28abc1 authored by Gibbs, Ian's avatar Gibbs, Ian
Browse files

bugfix, cmdline args

parent 123e1d97
Loading
Loading
Loading
Loading
Loading
+5 −13
Original line number Diff line number Diff line
@@ -4,33 +4,25 @@
# current default is system version
CONDA_ENVIRON=quicknxs-v1

# set the command to execute under the above environment
COMMAND="quicknxs"

if [ -v CONDA_ENVIRON ]; then

    # import library to do the real work
    source "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh"

    # put together arguments - conda_env, application, argv
    args=("${CONDA_ENVIRON}" "quicknxs" "$@")

    # override the normal call to activate_and_launch() function

    # first argument is conda environment
    CONDA_EXP_ENV="${1}"
    shift
    # second argument is startup command
    COMMAND="${1}"
    shift
    # the rest is passed to the command being started

    _remove_font_cache

    # rebuild the font cache
    fc-cache -r

    # start the application
    activate_conda_environment "${CONDA_EXP_ENV}"
    activate_conda_environment "${CONDA_ENVIRON}"

    echo "Execute: ${COMMAND} $*"
    "${COMMAND}" "$@"
}

fi