-
Notifications
You must be signed in to change notification settings - Fork 89
/
setup-conda.sh
executable file
·32 lines (26 loc) · 1001 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://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh; ;;
*) DOWNLOAD=https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-x86_64.sh; ;;
esac ;;
linux*)
case $(uname -m) in
aarch64) DOWNLOAD=https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh; ;;
*) DOWNLOAD=https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-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 $DOWNLOAD
wget $DOWNLOAD
bash Miniforge3-*.sh -b
~/miniforge3/bin/conda init $SHELL_NAME
echo Please close and reopen your terminal.