diff --git a/rpm/nsd-app-wrap.spec b/rpm/nsd-app-wrap.spec index 7b731fa0e911d416a255b2a789a3bfe072147423..40219da3b349fc4e6c3aa2a45fbaeca5a48907b9 100644 --- a/rpm/nsd-app-wrap.spec +++ b/rpm/nsd-app-wrap.spec @@ -1,5 +1,5 @@ Name: nsd-app-wrap -Version: 2.6 +Version: 2.7 Release: 1%{?dist} Summary: Wrapper scripts to launch python applications installed via anaconda Vendor: Peter F. Peterson diff --git a/src/addie b/src/addie index 496a9c25c0a5962da8a988df3f70b8683164fae5..ba8b45967c3f9b506f1137141a24faa9fd20346b 100644 --- a/src/addie +++ b/src/addie @@ -5,18 +5,18 @@ unset SESSION_MANAGER # select the environment to use -CONDA_ENVIRON=addie +PIXI_ENVIRON=addie # If `dev` or `qa` version requested, default to `--mode=mantid`. mode_arg="" if [ -n "$1" ]; then if [ "$1" == "--dev" ]; then - CONDA_ENVIRON=addie-dev + PIXI_ENVIRON=addie_dev shift # drop this argument if [ -z "$1" ]; then mode_arg="--mode=mantid" fi elif [ "$1" == "--qa" ]; then - CONDA_ENVIRON=addie-qa + PIXI_ENVIRON=addie_qa shift # drop this argument if [ -z "$1" ]; then mode_arg="--mode=mantid" @@ -31,9 +31,9 @@ fi # put together arguments - conda_env, application, argv if [ -n "${mode_arg}" ]; then - args=("${CONDA_ENVIRON}" "addie" "${mode_arg}" "${@}") + args=("${PIXI_ENVIRON}" "start_gui" "${mode_arg}" "${@}") else - args=("${CONDA_ENVIRON}" "addie" "${@}") + args=("${PIXI_ENVIRON}" "start_gui" "${@}") fi # launch the tool -activate_and_launch "${args[@]}" +pixi_launch "${args[@]}" diff --git a/src/drtsans b/src/drtsans index 63000e475e9d76dbdda1ebc4ff55c7c82072b026..d3a0acf9d5ae7d3d61505d5a28d4d35c4d4e34d0 100644 --- a/src/drtsans +++ b/src/drtsans @@ -1,13 +1,13 @@ #!/bin/bash # select the environment to use -CONDA_ENVIRON=sans +PIXI_ENVIRON=sans if [ -n "$1" ]; then if [ "$1" == "--dev" ]; then - CONDA_ENVIRON=sans-dev + PIXI_ENVIRON=sans_dev shift # drop this argument elif [ "$1" == "--qa" ]; then - CONDA_ENVIRON=sans-qa + PIXI_ENVIRON=sans_qa shift # drop this argument fi fi @@ -20,9 +20,10 @@ if [ -n "$1" ] && [ "$1" == "--classic" ]; then fi # import library to do the real work -. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" +. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" \ + || . /bin/nsd-app-wrap.sh # put together arguments - conda_env, application, argv -args=("${CONDA_ENVIRON}" "${STARTUP}" "$@") +args=("${PIXI_ENVIRON}" "${STARTUP}" "$@") # launch the tool -activate_and_launch "${args[@]}" +pixi_launch "${args[@]}" diff --git a/src/gsas2 b/src/gsas2 index 5c7690834d3ff1bd7689ceb1eae1182c1a1bc650..729d7e598c3df3b46efddf05fb9210defe8d3ac4 100644 --- a/src/gsas2 +++ b/src/gsas2 @@ -1,13 +1,14 @@ #!/bin/sh # select the environment to use -CONDA_ENVIRON=gsas2 +PIXI_ENVIRON=gsas2 # import library to do the real work -. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" +. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" \ + || . /bin/nsd-app-wrap.sh -# activate the environment - will be deactivated on exit -activate_conda_environment "${CONDA_ENVIRON}" +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "start_gui" "$@") +# launch the tool +pixi_launch "${args[@]}" -# start the application -python "${CONDA_PREFIX}/GSASII/GSASII.py" diff --git a/src/hyspecppt b/src/hyspecppt index ed2574e98fd56688f6d4cf69d7c684610e1c0307..25d718150a3c7f4aa67649dd5caf13a73677f438 100644 --- a/src/hyspecppt +++ b/src/hyspecppt @@ -2,13 +2,13 @@ # select the environment to use # current default is system version -CONDA_ENVIRON=hyspecppt +PIXI_ENVIRON=hyspecppt if [ -n "$1" ]; then if [ "$1" == "--dev" ]; then - CONDA_ENVIRON=hyspecppt-dev + PIXI_ENVIRON=hyspecppt_dev shift # drop this argument elif [ "$1" == "--qa" ]; then - CONDA_ENVIRON=hyspecppt-qa + PIXI_ENVIRON=hyspecppt_qa shift # drop this argument fi fi @@ -17,7 +17,8 @@ fi # shellcheck disable=SC1091 . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" \ || . /bin/nsd-app-wrap.sh + # put together arguments - conda_env, application, argv -args=("${CONDA_ENVIRON}" "hyspecppt" "$@") +args=("${PIXI_ENVIRON}" "start_gui" "$@") # launch the tool -activate_and_launch "${args[@]}" +pixi_launch "${args[@]}" diff --git a/src/ibeatles b/src/ibeatles index bbceb52d5d04b2f0ca32990d99196beb519d79ad..3f07b20a1d70b8884cd735c591ac8066bb47d03a 100644 --- a/src/ibeatles +++ b/src/ibeatles @@ -1,2 +1,16 @@ #!/bin/bash -/opt/anaconda/envs/ibeatles/bin/python -m ibeatles "$@" + +# select the environment to use +# current default is system version +PIXI_ENVIRON=ibeatles + +# import library to do the real work +# shellcheck disable=SC1091 +. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" \ + || . /bin/nsd-app-wrap.sh + +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "start_gui" "$@") +# launch the tool +pixi_launch "${args[@]}" + diff --git a/src/inspired b/src/inspired index 5f74374d469932cb8487442a77205e030ac73f88..6fc766016d8fd3711f6800c94b51a270857aaa60 100644 --- a/src/inspired +++ b/src/inspired @@ -2,26 +2,23 @@ # select the environment to use # current default is system version -CONDA_ENVIRON=inspired +PIXI_ENVIRON=inspired if [ -n "$1" ]; then if [ "$1" == "--dev" ]; then - CONDA_ENVIRON=inspired-dev + PIXI_ENVIRON=inspired_dev shift # drop this argument elif [ "$1" == "--qa" ]; then - CONDA_ENVIRON=inspired-qa + PIXI_ENVIRON=inspired_qa shift # drop this argument fi fi -if [ -v CONDA_ENVIRON ]; then - # import library to do the real work - # shellcheck disable=SC1091 - . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || - . /bin/nsd-app-wrap.sh +# import library to do the real work +# shellcheck disable=SC1091 +. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || + . /bin/nsd-app-wrap.sh - # activate the environment - will be deactivated on exit - activate_conda_environment "${CONDA_ENVIRON}" -fi - -# start the application -OMP_NUM_THREADS=1 inspired +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "start_gui" "$@") +# launch the tool +pixi_launch "${args[@]}" diff --git a/src/licorne b/src/licorne index 67a465f54806480ad017f9a483e0eb2d595dfbe7..1a1e9a36a31e4605f075be9e2adcbeeca0c1980e 100644 --- a/src/licorne +++ b/src/licorne @@ -2,18 +2,14 @@ # select the environment to use # current default is system version -CONDA_ENVIRON=licorne +PIXI_ENVIRON=licorne -if [ -v CONDA_ENVIRON ]; then - # import library to do the real work - # shellcheck disable=SC1091 - . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || - . /bin/nsd-app-wrap.sh +# import library to do the real work +# shellcheck disable=SC1091 +. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || + . /bin/nsd-app-wrap.sh - # put together arguments - conda_env, application, argv - #args=("${CONDA_ENVIRON}" "pyrsplot" "$@") - args=("${CONDA_ENVIRON}" "licorne" "$@") - - # start the application - activate_and_launch "${args[@]}" -fi +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "start_gui" "$@") +# launch the tool +pixi_launch "${args[@]}" diff --git a/src/mantidpythonnightly b/src/mantidpythonnightly index ab7ebe2c7052f48b69bc45c1cdf8e059831fe151..d00210e5b02890aade809a25177ce6362951cbc6 100644 --- a/src/mantidpythonnightly +++ b/src/mantidpythonnightly @@ -1,2 +1,2 @@ #!/bin/bash -"$(dirname "$(realpath "$0")")/nsd-conda-wrap.sh" mantid-dev "$@" +"$(dirname "$(realpath "$0")")/nsd-conda-wrap.sh" mantid_dev "$@" diff --git a/src/mantidpythonqa b/src/mantidpythonqa index 153c18fcbb0a7a4287a14dfc07d9af35306d873c..89056312fc020747df3cbbd8625ea23220e39141 100644 --- a/src/mantidpythonqa +++ b/src/mantidpythonqa @@ -1,2 +1,2 @@ #!/bin/bash -"$(dirname "$(realpath "$0")")/nsd-conda-wrap.sh" mantid-qa "$@" +"$(dirname "$(realpath "$0")")/nsd-conda-wrap.sh" mantid_qa "$@" diff --git a/src/mantidtotalscattering b/src/mantidtotalscattering index 295536d11853c1f07d7c1276a4b4bdc3ae622da9..450994668d03225abc03bf9daf7e1c4e45d6578d 100644 --- a/src/mantidtotalscattering +++ b/src/mantidtotalscattering @@ -1,13 +1,13 @@ #!/bin/bash # select the environment to use -CONDA_ENVIRON=mantidtotalscattering +PIXI_ENVIRON=mantidtotalscattering if [ -n "$1" ]; then if [ "$1" == "--dev" ]; then - CONDA_ENVIRON=mantidtotalscattering-dev + PIXI_ENVIRON=mantidtotalscattering_dev shift # drop this argument elif [ "$1" == "--qa" ]; then - CONDA_ENVIRON=mantidtotalscattering-qa + PIXI_ENVIRON=mantidtotalscattering_qa shift fi fi @@ -17,9 +17,7 @@ fi . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || . /bin/nsd-app-wrap.sh -# activate the environment - will be deactivated on exit -activate_conda_environment "${CONDA_ENVIRON}" - -# start the application -echo "$@" -mantidtotalscattering "$@" +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "start_gui" "$@") +# launch the tool +pixi_launch "${args[@]}" diff --git a/src/mantidworkbench b/src/mantidworkbench index 217a0345b3d378e2d0b9fac33c7d6b923040747a..aa719f6302b061e2a5f38ca95b0ccc7fab472c7e 100644 --- a/src/mantidworkbench +++ b/src/mantidworkbench @@ -8,21 +8,24 @@ for var in "$@"; do case "$var" in --env=*) - CONDA_ENV=$(echo "${var}" | awk -F"=" '{print $2}') + PIXI_ENV=$(echo "${var}" | awk -F"=" '{print $2}') + PIXI_TASK="start_mantid" shift 1 # remove this argument ;; --env) - CONDA_ENV="$2" # look ahead by one - shift 2 # remove the flag and value + PIXI_ENV="$2" # look ahead by one + PIXI_TASK="start_mantid" + shift 2 # remove the flag and value ;; esac done # default conda environment if it was not specified -if [ -z "${CONDA_ENV}" ]; then - CONDA_ENV="mantid" +if [ -z "${PIXI_ENV}" ]; then + PIXI_ENV="mantid" + PIXI_TASK="start_gui" fi # put together arguments - conda_env, application, argv -args=("${CONDA_ENV}" "/opt/anaconda/envs/${CONDA_ENV}/bin/mantidworkbench" "$@") +args=("${PIXI_ENV}" "${PIXI_TASK}" "$@") # launch the tool -activate_and_launch "${args[@]}" +pixi_launch "${args[@]}" diff --git a/src/mantidworkbenchnightly b/src/mantidworkbenchnightly index 3e261d2cb4b9bcb1024f6c4b978eee1dd1d492f4..6eb4827cd73531c8e67ad7f7f0279c857ececb38 100644 --- a/src/mantidworkbenchnightly +++ b/src/mantidworkbenchnightly @@ -5,7 +5,7 @@ . /bin/nsd-app-wrap.sh # put together arguments - conda_env, application, argv -CONDA_ENV="mantid-dev" -args=("${CONDA_ENV}" "/opt/anaconda/envs/${CONDA_ENV}/bin/mantidworkbench" "$@") +PIXI_ENV="mantid_dev" +args=("${PIXI_ENV}" "start_gui" "$@") # launch the tool -activate_and_launch "${args[@]}" +pixi_launch "${args[@]}" diff --git a/src/mantidworkbenchqa b/src/mantidworkbenchqa index e6d2a998654ebff4f7b45d8dc961424c42512a4d..c51b591f3c9cb407ac25edbe42a110aaf26f869a 100644 --- a/src/mantidworkbenchqa +++ b/src/mantidworkbenchqa @@ -5,7 +5,7 @@ . /bin/nsd-app-wrap.sh # put together arguments - conda_env, application, argv -CONDA_ENV="mantid-qa" -args=("${CONDA_ENV}" "/opt/anaconda/envs/${CONDA_ENV}/bin/mantidworkbench" "$@") +PIXI_ENV="mantid_qa" +args=("${PIXI_ENV}" "start_gui" "$@") # launch the tool -activate_and_launch "${args[@]}" +pixi_launch "${args[@]}" diff --git a/src/mpdf b/src/mpdf index 7e5f7386ba6a68e862a7583b51083eefd25db02d..3b57701d5694c485f67703e198b543b4bfc4a18a 100755 --- a/src/mpdf +++ b/src/mpdf @@ -2,7 +2,7 @@ # select the environment to use # current default is system version -CONDA_ENVIRON=mpdf -if [ -v CONDA_ENVIRON ]; then - "$(dirname "$(realpath "$0")")/nsd-conda-wrap.sh" "$CONDA_ENVIRON" "$@" +PIXI_ENVIRON=mpdf +if [ -v PIXI_ENVIRON ]; then + "$(dirname "$(realpath "$0")")/nsd-conda-wrap.sh" "$PIXI_ENVIRON" "$@" fi diff --git a/src/nr_launcher b/src/nr_launcher index a21a2e43e5b1aed38d0014b40257efbebda0b057..a5fabf3bc4815827a4a469c0f1cc3cff47ebd2bb 100644 --- a/src/nr_launcher +++ b/src/nr_launcher @@ -1,22 +1,2 @@ #!/bin/bash - -# select the environment to use -CONDA_ENVIRON=refl1d - -# check if the conda environment exists -if ! conda env list | \grep -q "^${CONDA_ENVIRON}[[:space:]]"; then - CONDA_ENVIRON=refl1d-qa -fi - -if [ -v CONDA_ENVIRON ]; then - # import library to do the real work - # shellcheck disable=SC1091 - . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || - . /bin/nsd-app-wrap.sh - - # put together arguments - conda_env, application, location, arguments passed to this script - args=("${CONDA_ENVIRON}" "source" "/SNS/REF_L/shared/launcher/nsd_app_wrap_nr_launcher.sh" "$@") - - # start the application - activate_and_launch "${args[@]}" -fi +cd /SNS/REF_L/shared/launcher; python launcher.py diff --git a/src/nseplot b/src/nseplot index 7bd83afbcdc565d1a41662cee1296feba99ecfce..e29dbb142b259bfb6c9db9091c355ef95824d04d 100755 --- a/src/nseplot +++ b/src/nseplot @@ -2,16 +2,14 @@ # select the environment to use # current default is system version -CONDA_ENVIRON=pysen -if [ -v CONDA_ENVIRON ]; then - # import library to do the real work - # shellcheck disable=SC1091 - . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || - . /bin/nsd-app-wrap.sh +PIXI_ENVIRON=pysen - # put together arguments - conda_env, application, argv - args=("${CONDA_ENVIRON}" "nseplot" "$@") +# import library to do the real work +# shellcheck disable=SC1091 +. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || + . /bin/nsd-app-wrap.sh - # start the application - activate_and_launch "${args[@]}" -fi +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "nseplot" "$@") +# launch the tool +pixi_launch "${args[@]}" diff --git a/src/paraview b/src/paraview index eaacc4bdb1470aba0f533788a34e2209623fdb8e..40ae384a988b8aaf8d2ad2b23a211cccf0314513 100644 --- a/src/paraview +++ b/src/paraview @@ -2,15 +2,13 @@ # select the environment to use # current default is system version -CONDA_ENVIRON=paraview -if [ -v CONDA_ENVIRON ]; then - # import library to do the real work - . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" \ - || . /bin/nsd-app-wrap.sh +PIXI_ENVIRON=paraview +# import library to do the real work +. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" \ + || . /bin/nsd-app-wrap.sh - # put together arguments - conda_env, application, argv - args=("${CONDA_ENVIRON}" "paraview" "$@") +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "paraview" "$@") - # start the application - activate_and_launch "${args[@]}" -fi +# start the application +pixi_launch "${args[@]}" diff --git a/src/pdfgui2 b/src/pdfgui2 index 1788bfb0a5c2c70cf40a6104ffe18b26fcc26a63..a9c248dcc16ed9bfa3279009e962f6cc548c4e57 100644 --- a/src/pdfgui2 +++ b/src/pdfgui2 @@ -2,16 +2,14 @@ # select the environment to use # current default is system version -CONDA_ENVIRON=pdfgui2 -if [ -v CONDA_ENVIRON ]; then - # import library to do the real work - # shellcheck disable=SC1091 - . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || - . /bin/nsd-app-wrap.sh +PIXI_ENVIRON=pdfgui +# import library to do the real work +# shellcheck disable=SC1091 +. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || + . /bin/nsd-app-wrap.sh - # put together arguments - conda_env, application, argv - args=("${CONDA_ENVIRON}" "pdfgui" "$@") +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "start_gui" "$@") - # start the application - activate_and_launch "${args[@]}" -fi +# start the application +pixi_launch "${args[@]}" diff --git a/src/pyrs b/src/pyrs index 9fa8e3263e355271ac2abebb718cc64e860883d9..56f116eed6f7a9ea3f16c7be7c01783ab2af336f 100644 --- a/src/pyrs +++ b/src/pyrs @@ -2,26 +2,24 @@ # select the environment to use # current default is system version -CONDA_ENVIRON=pyrs +PIXI_ENVIRON=pyrs if [ -n "$1" ]; then if [ "$1" == "--dev" ]; then - CONDA_ENVIRON=pyrs-dev + PIXI_ENVIRON=pyrsi_dev shift # drop this argument elif [ "$1" == "--qa" ]; then - CONDA_ENVIRON=pyrs-qa + PIXI_ENVIRON=pyrs_qa shift # drop this argument fi fi -if [ -v CONDA_ENVIRON ]; then - # import library to do the real work - # shellcheck disable=SC1091 - . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || - . /bin/nsd-app-wrap.sh +# import library to do the real work +# shellcheck disable=SC1091 +. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || + . /bin/nsd-app-wrap.sh - # put together arguments - conda_env, application, argv - args=("${CONDA_ENVIRON}" "pyrsplot" "$@") +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "pyrsplot" "$@") - # start the application - activate_and_launch "${args[@]}" -fi +# start the application +pixi_launch "${args[@]}" diff --git a/src/refl1d b/src/refl1d index 0ab392e22a258e4e643bc6ce3051b0b091818387..463190011adaaca68380b35a869f33abd2a62a63 100644 --- a/src/refl1d +++ b/src/refl1d @@ -7,31 +7,23 @@ unset SESSION_MANAGER COMMAND="refl1d" # --port XXXX # select the environment to use -CONDA_ENVIRON=refl1d-qa +PIXI_ENVIRON=refl1d_qa if [ -n "$1" ]; then if [ "$1" == "--dev" ]; then - CONDA_ENVIRON=refl1d-dev + PIXI_ENVIRON=refl1d_dev shift # drop this argument elif [ "$1" == "--qa" ]; then - CONDA_ENVIRON=refl1d-qa + PIXI_ENVIRON=refl1d_qa shift # drop this argument fi fi -if [ -v CONDA_ENVIRON ]; then - # import library to do the real work - # shellcheck disable=SC1091 - . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || - . /bin/nsd-app-wrap.sh # Resolves to /bin/nsd-app-wrap.sh ? +# import library to do the real work +# shellcheck disable=SC1091 +. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || + . /bin/nsd-app-wrap.sh # Resolves to /bin/nsd-app-wrap.sh ? - # override the normal call to activate_and_launch() function - activate_conda_environment "${CONDA_ENVIRON}" - - # remove and rebuild the font cache - _remove_font_cache - fc-cache -r - - # start the application - echo "Execute: ${COMMAND} $*" - "${COMMAND}" "$@" -fi +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "start_gui" "$@") +# launch the tool +pixi_launch "${args[@]}" diff --git a/src/refred b/src/refred index f8229027dd432c70177d4c10f302d84a7132ad31..f188dced09e06a9e9679611b6ed904c4351f25b4 100644 --- a/src/refred +++ b/src/refred @@ -1,13 +1,13 @@ #!/bin/bash # select the environment to use -CONDA_ENVIRON=refred +PIXI_ENVIRON=refred if [ -n "$1" ]; then if [ "$1" == "--dev" ]; then - CONDA_ENVIRON=refred-dev + PIXI_ENVIRON=refred_dev shift # drop this argument elif [ "$1" == "--qa" ]; then - CONDA_ENVIRON=refred-qa + PIXI_ENVIRON=refred_qa shift # drop this argument fi fi @@ -18,7 +18,6 @@ fi . /bin/nsd-app-wrap.sh # put together arguments - conda_env, application, argv -args=("${CONDA_ENVIRON}" "refred-gui" "$@") - +args=("${PIXI_ENVIRON}" "start_gui" "$@") # launch the tool -activate_and_launch "${args[@]}" +pixi_launch "${args[@]}" diff --git a/src/sasview b/src/sasview index ae12414ab72492ab9fedead9738284d4f0afac0a..9d85dca8c8975260d605b357f5e8ddc3e65bfe16 100644 --- a/src/sasview +++ b/src/sasview @@ -2,16 +2,14 @@ # select the environment to use # current default is system version -CONDA_ENVIRON=sasview -if [ -v CONDA_ENVIRON ]; then - # import library to do the real work - # shellcheck disable=SC1091 - . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || - . /bin/nsd-app-wrap.sh +PIXI_ENVIRON=sasview - # put together arguments - conda_env, application, argv - args=("${CONDA_ENVIRON}" "sasview" "$@") +# import library to do the real work +# shellcheck disable=SC1091 +. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || + . /bin/nsd-app-wrap.sh - # start the application - activate_and_launch "${args[@]}" -fi +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "start_gui" "$@") +# launch the tool +pixi_launch "${args[@]}" diff --git a/src/shiver b/src/shiver index 1fef813480d21ef6d995209d42b78a2de4a8b4bc..31778001e77a71b346df9660239e5645ff30754b 100644 --- a/src/shiver +++ b/src/shiver @@ -1,13 +1,13 @@ #!/bin/bash # select the environment to use -CONDA_ENVIRON=shiver +PIXI_ENVIRON=shiver if [ -n "$1" ]; then if [ "$1" == "--dev" ]; then - CONDA_ENVIRON=shiver-dev + PIXI_ENVIRON=shiver_dev shift # drop this argument elif [ "$1" == "--qa" ]; then - CONDA_ENVIRON=shiver-qa + PIXI_ENVIRON=shiver_qa shift # drop this argument fi fi @@ -18,6 +18,6 @@ fi . /bin/nsd-app-wrap.sh # put together arguments - conda_env, application, argv -args=("${CONDA_ENVIRON}" "shiver" "$@") +args=("${PIXI_ENVIRON}" "start_gui" "$@") # launch the tool -activate_and_launch "${args[@]}" +pixi_launch "${args[@]}" diff --git a/src/snapwrap b/src/snapwrap index 02eebccf6e3cad6b6be68c2eca67005e31765c28..1f1a55ee3e602cb7bac1ad391e90a5383b18fdc1 100644 --- a/src/snapwrap +++ b/src/snapwrap @@ -2,26 +2,23 @@ # select the environment to use # current default is system version -CONDA_ENVIRON=snapwrap +PIXI_ENVIRON=snapwrap if [ -n "$1" ]; then if [ "$1" == "--dev" ]; then - CONDA_ENVIRON=snapwrap-dev + PIXI_ENVIRON=snapwrap_dev shift # drop this argument elif [ "$1" == "--qa" ]; then - CONDA_ENVIRON=snapwrap-qa + PIXI_ENVIRON=snapwrap_qa shift # drop this argument fi fi -if [ -v CONDA_ENVIRON ]; then - # import library to do the real work - # shellcheck disable=SC1091 - . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || - . /bin/nsd-app-wrap.sh +# import library to do the real work +# shellcheck disable=SC1091 +. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" \ + || . /bin/nsd-app-wrap.sh - # activate the environment - will be deactivated on exit - activate_conda_environment "${CONDA_ENVIRON}" -fi - -# start the application -python -m workbench +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "python -m workbench" "$@") +# launch the tool +pixi_launch "${args[@]}" diff --git a/src/usansred b/src/usansred index 920f576503c161b25460121fedf40229a255c424..4ff74761b6f0a3add79d8d123b35e6992b4c72fb 100644 --- a/src/usansred +++ b/src/usansred @@ -2,24 +2,24 @@ # select the environment to use # current default is system version -CONDA_ENVIRON=usansred +PIXI_ENVIRON=usansred if [ -n "$1" ]; then if [ "$1" == "--dev" ]; then - CONDA_ENVIRON=usansred-dev + PIXI_ENVIRON=usansred_dev shift # drop this argument elif [ "$1" == "--qa" ]; then - CONDA_ENVIRON=usansred-qa + PIXI_ENVIRON=usansred_qa shift # drop this argument fi fi -if [ -v CONDA_ENVIRON ]; then - # import library to do the real work - # shellcheck disable=SC1091 - . "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" || - . /bin/nsd-app-wrap.sh - # activate the environment - will be deactivated on exit - activate_conda_environment "${CONDA_ENVIRON}" -fi +# import library to do the real work +# shellcheck disable=SC1091 +. "$(dirname "$(realpath "$0")")/nsd-app-wrap.sh" \ + || . /bin/nsd-app-wrap.sh + +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "python" "$@") -# (there is no default appliation to launch) +# launch the tool +pixi_launch "${args[@]}"