feat: install miniconda in macOS
This commit is contained in:
parent
324e4cfcb6
commit
50af7ec818
@ -55,12 +55,28 @@ configure_gpg() {
|
||||
configure_miniconda() {
|
||||
[ -d ~/.miniconda3 ] && return
|
||||
[ $offline -eq 1 ] && return
|
||||
[[ $(uname -m) == "aarch64" ]] && return
|
||||
|
||||
OS_TYPE=$(uname -s)
|
||||
ARCH=$(uname -m)
|
||||
|
||||
# Skip aarch64 as it is handled by Miniforge
|
||||
if [[ "$ARCH" == "aarch64" || "$ARCH" == "arm64" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ "$OS_TYPE" == "Linux" ]]; then
|
||||
INSTALLER="Miniconda3-latest-Linux-${ARCH}.sh"
|
||||
elif [[ "$OS_TYPE" == "Darwin" ]]; then
|
||||
INSTALLER="Miniconda3-latest-MacOSX-${ARCH}.sh"
|
||||
else
|
||||
echo "Unsupported OS: $OS_TYPE"
|
||||
return
|
||||
fi
|
||||
|
||||
if confirm_action "要安装 miniconda 吗?" "N"; then
|
||||
wget "https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-$(uname -m).sh" -O $tempdir/miniconda.sh
|
||||
bash $tempdir/miniconda.sh -b -p ~/.miniconda3
|
||||
rm $tempdir/miniconda.sh
|
||||
wget "https://repo.anaconda.com/miniconda/$INSTALLER" -O "$tempdir/miniconda.sh"
|
||||
bash "$tempdir/miniconda.sh" -b -p "$HOME/.miniconda3"
|
||||
rm "$tempdir/miniconda.sh"
|
||||
~/.miniconda3/bin/conda init zsh
|
||||
~/.miniconda3/bin/conda config --set changeps1 False
|
||||
~/.miniconda3/bin/conda install -c conda-forge mamba
|
||||
|
||||
Loading…
Reference in New Issue
Block a user