From 05d536021efd57fbfddbcc9deaf0efd8cdf2f174 Mon Sep 17 00:00:00 2001
From: Romain Boman <romain.boman@gmail.com>
Date: Mon, 17 Feb 2025 11:06:55 +0100
Subject: [PATCH] add conda as a function

---
 cfg/fsa-spirou/conda.bashrc | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 cfg/fsa-spirou/conda.bashrc

diff --git a/cfg/fsa-spirou/conda.bashrc b/cfg/fsa-spirou/conda.bashrc
new file mode 100644
index 0000000..903196c
--- /dev/null
+++ b/cfg/fsa-spirou/conda.bashrc
@@ -0,0 +1,19 @@
+# je copie ici les lignes de conda.sh qui sont dans le .bashrc
+
+function use_conda() {
+
+    # >>> conda initialize >>>                                                      
+    # !! Contents within this block are managed by 'conda init' !!                  
+    __conda_setup="$('/home/boman/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
+    if [ $? -eq 0 ]; then                                                          
+    eval "$__conda_setup"                                                      
+    else                                                                           
+    if [ -f "/home/boman/miniconda3/etc/profile.d/conda.sh" ]; then            
+        . "/home/boman/miniconda3/etc/profile.d/conda.sh"                      
+    else                                                                       
+        export PATH="/home/boman/miniconda3/bin:$PATH"                         
+    fi                                                                         
+    fi                                                                             
+    unset __conda_setup                                                            
+    # <<< conda initialize <<<  
+}
-- 
GitLab