# HG changeset patch # User IBBoard # Date 1568024352 -3600 # Node ID 724d0e149569f8055a7cbc1581bc99549a92f842 # Parent f762f1a9c80f2b608298abb2c509d0a512c09f72 Add a function for base Conda activation This lets us CHOOSE to use Conda rather than having it always enabled (which is their default setup) without having to remember to "source ~/.local/bin/conda_activate" diff -r f762f1a9c80f -r 724d0e149569 bashrc --- a/bashrc Thu Jun 06 20:05:16 2019 +0100 +++ b/bashrc Mon Sep 09 11:19:12 2019 +0100 @@ -74,4 +74,18 @@ # Set a hidden R package directory export R_LIBS_USER=~/.R/ # And stop it asking us to save the workspace -alias R='R --no-save' \ No newline at end of file +alias R='R --no-save' + +conda_activate() { + __conda_setup="$(~/.anaconda3/bin/conda 'shell.bash' 'hook' 2> /dev/null)" + if [ $? -eq 0 ]; then + eval "$__conda_setup" + else + if [ -f ~"/.anaconda3/etc/profile.d/conda.sh" ]; then + . ~"/.anaconda3/etc/profile.d/conda.sh" + else + export PATH=~"/.anaconda3/bin:$PATH" + fi + fi + unset __conda_setup +} \ No newline at end of file