Last active
February 5, 2020 14:15
-
-
Save VictorGob/475eb3724714ccc0750ea13021098995 to your computer and use it in GitHub Desktop.
Get last Minicoda version (for Anaconda too)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#* It gets last Miniconda3 Linux version and install it | |
CONDA_INSTALLER_URL='https://repo.anaconda.com/miniconda/' | |
OUTPUT_INSTALLER='/tmp/Miniconda3-latest-Linux-x86_64.sh' | |
echo "*** Descargando instalador de Anaconda --> Miniconda3-latest-Linux-x86_64.sh" | |
curl "$CONDA_INSTALLER_URL"Miniconda3-latest-Linux-x86_64.sh --output $OUTPUT_INSTALLER | |
INSTALLER_MD5=$(curl -s $CONDA_INSTALLER_URL 2>&1 | awk '$1=$1' ORS=' ' | perl -n -e'/href="Miniconda3-latest-Linux-x86_64.sh.*?([a-f0-9]{32})/ && print $1' ) | |
GET_MD5=$(md5sum $OUTPUT_INSTALLER | awk '{ print $1 }') | |
echo "*** reported md5: "$GET_MD5 | |
echo "*** calculated md5: "$INSTALLER_MD5 | |
#* MD5 check | |
if [ "$INSTALLER_MD5" != "$GET_MD5" ]; then | |
echo "ERROR: md5sum not equal !!!" | |
exit 1 | |
fi | |
chmod +x $OUTPUT_INSTALLER | |
echo "*** Instalando Anaconda" | |
/bin/bash -c '$0 -b -p /opt/Miniconda3' $OUTPUT_INSTALLER |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment