From 6cfb154d82fe252089b10ef92db3a63707c2a60b Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Wed, 20 Mar 2024 20:17:42 -0400 Subject: [PATCH] fix(esi-shell): support only linux (#13) --- esi-shell | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/esi-shell b/esi-shell index 86faebe..5dff6bf 100755 --- a/esi-shell +++ b/esi-shell @@ -15,6 +15,12 @@ then abort "Bash is required to interpret this script." fi +# Fail fast if OS is not Linux +if [[ "$(uname)" != "Linux" ]] +then + abort "esi-shell is only supported on Linux." +fi + REQUIRED_SINGULARITY_VERSION=3.7.4 REQUIRED_DOCKER_VERSION=23.0.0 @@ -187,17 +193,6 @@ find_tool() { done < <(which -a "$1") } -# First check OS. -OS="$(uname)" -if [[ "${OS}" == "Linux" ]] -then - ESI_ON_LINUX=1 -elif [[ "${OS}" == "Darwin" ]] -then - ESI_ON_MACOS=1 -else - abort "esi-shell is only supported on macOS and Linux." -fi MOUNT="" for dir in /Volumes /Users /tmp; do