mamba/micromamba/etc/profile.d/mamba.sh.in

23 lines
1.2 KiB
Bash

if [ ! -v MAMBA_ROOT_PREFIX ]; then
echo "WARNING: The MAMBA_ROOT_PREFIX environment variable is not set."
echo "WARNING: This is required for mamba to work correctly as of 2.0."
echo "WARNING: "
echo "WARNING: For now, we are setting 'MAMBA_ROOT_PREFIX' to '@CMAKE_INSTALL_PREFIX@'."
echo "WARNING: "
echo "WARNING: Please make sure this is consistent with your installation or alternatively (by order of preference):"
echo "WARNING: - rerun 'mamba shell init' to initialize mamba for your current shell"
echo "WARNING: - manually set 'MAMBA_ROOT_PREFIX' to the root of your installation in your shell profile script."
echo "WARNING: - use the '-r,--root-prefix' CLI option when calling mamba."
echo "WARNING: "
echo "WARNING: This message originates from @CMAKE_INSTALL_PREFIX@/etc/profile.d/mamba.sh"
export MAMBA_ROOT_PREFIX="@CMAKE_INSTALL_PREFIX@"
fi
__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 mamba="@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/mamba" # Fallback on help from mamba activate
fi
unset __mamba_setup