29 lines
735 B
Bash
29 lines
735 B
Bash
#! /bin/bash
|
|
|
|
# locally install mamba for this user
|
|
#
|
|
# 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
|
|
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
|
|
|
|
#rm -f "$bin_path"
|