forked from AnswerDotAI/fastsetup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-conda.sh
executable file
·32 lines (26 loc) · 933 Bytes
/
setup-conda.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
set -eou pipefail
case "$OSTYPE" in
darwin*)
case $(uname -m) in
arm64) DOWNLOAD=https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh; ;;
*) DOWNLOAD=https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh; ;;
esac ;;
linux*)
case $(uname -m) in
aarch64) DOWNLOAD=https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh; ;;
*) DOWNLOAD=https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh; ;;
esac ;;
*) echo "unknown: $OSTYPE" ;;
esac
case "$SHELL" in
*bin/zsh*) SHELL_NAME=zsh; ;;
*bin/bash*) SHELL_NAME=bash ;;
*bin/fish*) SHELL_NAME=fish ;;
*) echo "unknown: $SHELL" ;;
esac
echo Downloading installer...
curl -LO --no-progress-meter $DOWNLOAD
bash Miniconda3-*.sh -b
~/miniconda3/bin/conda init $SHELL_NAME
echo Please close and reopen your terminal.