Update mamba.sh.in script (#3422)

* Update mamba.sh.in script

* Set root prefix

* Update mamba_package/etc/profile.d/mamba.sh.in

Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>

---------

Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
This commit is contained in:
Sylvain Corlay 2024-08-31 00:31:20 +02:00 committed by GitHub
parent d51cd0e451
commit 4f73c92713
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,8 @@
__mamba_setup="$("@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/mamba" shell hook --shell zsh --root-prefix "@CMAKE_INSTALL_PREFIX@" 2> /dev/null)"
export MAMBA_ROOT_PREFIX="@CMAKE_INSTALL_PREFIX@"
__mamba_setup="$("@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/mamba" shell hook --shell posix 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__mamba_setup"
else
alias micromamba="@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/mamba" # Fallback on help from mamba activate
alias mamba="@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/mamba" # Fallback on help from mamba activate
fi
unset __mamba_setup