Skip to content

Instantly share code, notes, and snippets.

@yogeshvar
Last active August 23, 2022 17:21
Show Gist options
  • Save yogeshvar/d168249188742eb015aa1a6c09b2d177 to your computer and use it in GitHub Desktop.
Save yogeshvar/d168249188742eb015aa1a6c09b2d177 to your computer and use it in GitHub Desktop.
MiniForge & MiniConda
# Usage: source ~/.zshrc m1
if [[ $1 = "m1" ]]; then
pkg=miniforge3
else
# default is miniconda3
pkg=miniconda3
fi
echo "Using $pkg"
__conda_setup="$(`~/$pkg/bin/conda` 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "~/$pkg/etc/profile.d/conda.sh" ]; then
. "~/$pkg/etc/profile.d/conda.sh" # commented out by conda initialize
else
export PATH="~/$pkg/bin:$PATH"
fi
fi
unset __conda_setup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment