Skip to content

Commit 0b00833

Browse files
authored
install_isis.sh fixes (#5917)
* fix isisVarInit.py path * Remove dash from isis env name * fixes
1 parent fac2e54 commit 0b00833

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

isis/scripts/install_isis.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ fi
347347
if [ "$ENV_NAME" = "auto" ]; then
348348
# Get latest version from specified channels
349349
LATEST_VERSION=$(conda search $PACKAGE_NAME | grep -E "^isis\s+" | tail -n 1 | awk '{print $2}')
350-
ENV_NAME="isis-$LATEST_VERSION"
350+
ENV_NAME="isis$LATEST_VERSION"
351351
fi
352352

353353
# Handle the --install-prefix flag
@@ -369,7 +369,7 @@ ENV_PATH=$INSTALL_PREFIX
369369
echo "Installing ISIS at $INSTALL_PREFIX"
370370

371371
# Check if the environment already exists
372-
if [ $CLIENT env list | grep -qE "^$ENV_NAME[ ]." ] || [ -d $INSTALL_PREFIX ]; then
372+
if $CLIENT env list | grep -qE "^$ENV_NAME[[:space:]]" || [ -d "$INSTALL_PREFIX" ]; then
373373
if [ "$FORCE_INSTALL" = "YES" ]; then
374374
echo "Force flag is set. Removing existing environment [$ENV_NAME]"
375375
$CLIENT remove -p $INSTALL_PREFIX --all -y || failed_command "Remove existing environment"
@@ -553,13 +553,13 @@ if [ ! "$DOWNLOAD_DATA" = "NO" ]; then
553553
fi
554554
fi
555555

556-
# Run isisvarinit.py with ISISDATA and ISISROOT
557-
if [ -x "$INSTALL_PREFIX/isis/scripts/isisVarInit.py" ]; then
556+
# Run isisVarInit.py with ISISDATA and ISISROOT
557+
if [ -x "$INSTALL_PREFIX/scripts/isisVarInit.py" ]; then
558558
ISISROOT="$INSTALL_PREFIX"
559559
ISISDATA="$ISISDATA_PREFIX"
560-
"$INSTALL_PREFIX/isis/scripts/isisVarInit.py" "$ISISDATA" "$ISISROOT" || failed_command "Running isisvarinit.py"
560+
python "$INSTALL_PREFIX/scripts/isisVarInit.py" -d "$ISISDATA" || failed_command "Running isisVarInit.py"
561561
else
562-
echo "Warning: isisvarinit.py not found or not executable in $INSTALL_PREFIX/isis/scripts/"
562+
echo "Warning: isisVarInit.py not found or not executable in $INSTALL_PREFIX/scripts/"
563563
fi
564564

565565
printf "\n\n"

0 commit comments

Comments
 (0)