Skip to content

Commit

Permalink
ENH: supports edm 4 on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
dpinte committed Oct 8, 2024
1 parent f603052 commit 8278569
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/install-edm-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,20 @@ INSTALL_EDM_VERSION=$1
DOWNLOAD_DIR=$2

install_edm() {
local EDM_MAJOR="$(echo "$INSTALL_EDM_VERSION" | sed -E -e 's/([[:digit:]]+)\..*/\1/')"
local EDM_MAJOR_MINOR="$(echo "$INSTALL_EDM_VERSION" | sed -E -e 's/([[:digit:]]+\.[[:digit:]]+)\..*/\1/')"
local EDM_PACKAGE="edm_cli_${INSTALL_EDM_VERSION}_linux_x86_64.sh"
local EDM_INSTALLER_PATH="${DOWNLOAD_DIR}/${EDM_PACKAGE}"

# Use rh8 for version 4.0.0 and later, otherwise use rh6
if [ "$EDM_MAJOR" -gt "3" ]; then
local EDM_URL="https://package-data.enthought.com/edm/rh8_x86_64/${EDM_MAJOR_MINOR}/${EDM_PACKAGE}"
else
local EDM_URL="https://package-data.enthought.com/edm/rh6_x86_64/${EDM_MAJOR_MINOR}/${EDM_PACKAGE}"
fi

if [ ! -e "$EDM_INSTALLER_PATH" ]; then
curl --fail --show-error -o "$EDM_INSTALLER_PATH" -L "https://package-data.enthought.com/edm/rh6_x86_64/${EDM_MAJOR_MINOR}/${EDM_PACKAGE}"
curl --fail --show-error -o "$EDM_INSTALLER_PATH" -L "$EDM_URL"
fi

bash "$EDM_INSTALLER_PATH" -b -p "${HOME}/edm"
Expand Down

0 comments on commit 8278569

Please sign in to comment.