From 92262dc43cd721bf10b1bf734f8cfd045d12c84e Mon Sep 17 00:00:00 2001 From: sof202 Date: Fri, 22 Nov 2024 10:16:46 +0000 Subject: [PATCH 1/3] build: add execution permissions --- Setup/setup | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 Setup/setup diff --git a/Setup/setup b/Setup/setup old mode 100644 new mode 100755 From 16e295f59e3fdeb64e15fc008976573f3ba6d329 Mon Sep 17 00:00:00 2001 From: sof202 Date: Fri, 22 Nov 2024 10:19:50 +0000 Subject: [PATCH 2/3] fix: only show usage if -h or --help is argument --- Setup/setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Setup/setup b/Setup/setup index 42f6abd..d69a3ce 100755 --- a/Setup/setup +++ b/Setup/setup @@ -15,7 +15,7 @@ EOF exit 0 } -if [ "$#" -eq 0 ]; then usage; fi +if [[ $1 == "-h" || $1 == "--help" ]]; then usage; fi REPO_DIR=$(dirname "$0")/.. From c65f21f51b4e0a9de3c708b02e113515ccd1141c Mon Sep 17 00:00:00 2001 From: sof202 Date: Fri, 22 Nov 2024 10:20:35 +0000 Subject: [PATCH 3/3] fix: only read CONDA_SHELL if previous path failed --- Setup/setup | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Setup/setup b/Setup/setup index d69a3ce..28a6982 100755 --- a/Setup/setup +++ b/Setup/setup @@ -43,9 +43,8 @@ fi CONDA_SHELL="${CONDA_EXE%/bin/conda}/etc/profile.d/conda.sh" source "${CONDA_SHELL}" || { echo "Could not find conda shell at: ${CONDA_SHELL}. Please provide the path to this file -(.../conda/etc/profile.d/conda.sh"; } +(.../conda/etc/profile.d/conda.sh"; read -r CONDA_SHELL; } -read -r CONDA_SHELL source "${CONDA_SHELL}" || { echo "Could not find conda shell at: ${CONDA_SHELL}"; exit 1; }