dotfiles/dot_config/bootstrap/executable_mamba

29 lines
735 B
Plaintext
Raw Permalink Normal View History

#! /bin/bash
# locally install mamba for this user
2022-09-08 14:47:57 -04:00
#
# USAGE: bootstrap_mamba [VERSION]
#
# where VERSION is something like 'X.Y.Z-A' corresponding to a tagged release
if [ -z "$1" ]; then
echo "Installing latest version of mambaforge"
subdir=latest/download
else
echo "Installing version $1 of mambaforge"
subdir="download/$1"
fi
bin_path=~/.local/bin/mamba_installer.sh
mamba_root=$XDG_DATA_HOME/mambaforge
# this needs to be present or else the installer will fail
mkdir -p $XDG_DATA_HOME/conda/{pkgs,envs}
# TODO configure version
2022-09-08 14:47:57 -04:00
curl -L -o "$bin_path" "https://github.com/conda-forge/miniforge/releases/$subdir/Mambaforge-$(uname)-$(uname -m).sh"
bash "$bin_path" -p "$mamba_root" -b -f
2022-09-08 14:47:57 -04:00
#rm -f "$bin_path"