diff --git a/rpm/nsd-app-wrap.spec b/rpm/nsd-app-wrap.spec index 01201ac355add40db50fb7729840774bd80f07ce..dd41068caba720b9bedc09dd8b078430da1e7e32 100644 --- a/rpm/nsd-app-wrap.spec +++ b/rpm/nsd-app-wrap.spec @@ -1,5 +1,5 @@ Name: nsd-app-wrap -Version: 2.02 +Version: 2.03 Release: 1%{?dist} Summary: Wrapper scripts to launch python applications installed via anaconda Vendor: Peter F. Peterson diff --git a/src/nsd-app-wrap.sh b/src/nsd-app-wrap.sh index ee3ef12b424c1f68358ef162b35b3f72b91d120c..ae0f4fb6ac4f47aaa27b266199efe96638b5d375 100755 --- a/src/nsd-app-wrap.sh +++ b/src/nsd-app-wrap.sh @@ -102,12 +102,17 @@ pixi_launch() { PIXI_PREFIX="/usr/local/pixi" PIXI_ENV="${1}" shift - - # This grabs everything past the first argument - PIXI_TASK="${@}" + # This grabs everything past the first argument + PIXI_TASK="${*}" path_to_manifest="${PIXI_PREFIX%/}/${PIXI_ENV}" + # Verify path_to_manifest works + if [ ! -f "${path_to_manifest}" ]; then + echo "No pixi environment found at ${path_to_manifest}" + exit 1 + fi + #echo "P: $PIXI_PREFIX, E: $PIXI_ENV, T: $PIXI_TASK - ptm: $path_to_manifest." _remove_font_cache diff --git a/src/nsd-conda-wrap.sh b/src/nsd-conda-wrap.sh index 37ced1c76df774ebdd9283d3116b7f1adc689e65..ee47dad6d563b0fcab6e01388dc14d73d8f77708 100755 --- a/src/nsd-conda-wrap.sh +++ b/src/nsd-conda-wrap.sh @@ -13,7 +13,7 @@ if [ -n "$1" ]; then _usage exit 0 fi - CONDA_ENVIRON="$1" + PIXI_ENVIRON="$1" shift # drop this argument else echo "Must specify a conda environment to activate" @@ -33,8 +33,8 @@ 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 -"$STARTUP" "$@" +# launch pixi +# put together arguments - conda_env, application, argv +args=("${PIXI_ENVIRON}" "$STARTUP" "$@") +# launch the tool +pixi_launch "${args[@]}"