Commit 237e65b0 authored by Zhang, Yuanpeng's avatar Zhang, Yuanpeng
Browse files

Merge branch 'main' into 'main'

update addie wrapper

See merge request sns-hfir-scse/infrastructure/nsd-app-wrap!19
parents 5e2e64ad 31e2145a
Loading
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
#!/bin/bash

# Suppress the Qt Session management error. See link below,
# http://bit.ly/3JhBV54
unset SESSION_MANAGER

# select the environment to use
CONDA_ENVIRON=addie
# If `dev` or `qa` version requested, default to `--mode=mantid`.
real_arg=""
if [ -n "$1" ]; then
  if [ "$1" == "--dev" ]; then
    CONDA_ENVIRON=addie-dev
    shift  # drop this argument
    if [ ! -n "$1" ]; then
        real_arg="${@}--mode=mantid"
    fi
  elif [ "$1" == "--qa" ]; then
    CONDA_ENVIRON=addie-qa
    shift  # drop this argument
    if [ ! -n "$1" ]; then
        real_arg="${@}--mode=mantid"
    fi
  fi
fi

@@ -16,7 +28,11 @@ fi
source "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh"

# put together arguments - conda_env, application, argv
args=("${CONDA_ENVIRON}" "addie" "$@")
if [ "$real_arg" == "" ]; then
    args=("${CONDA_ENVIRON}" "addie" "${@}")
else
    args=("${CONDA_ENVIRON}" "addie" "$real_arg")
fi
# remove font-cache to side step startup speed issue
rm -f ${HOME}/.cache/fontconfig/*
# launch the tool