Commit 0404ac2f authored by Alejandro Homs Puron's avatar Alejandro Homs Puron
Browse files

lima_conda_build: improve conda environment management

parent c2ed3a8c
Pipeline #50793 passed with stages
in 25 minutes and 52 seconds
......@@ -60,14 +60,14 @@ src_dir=$(realpath ${src_dir})
echo "Source directory: ${src_dir}"
cd ${src_dir}
if [ -n "${conda_base}" ]; then
PATH=${conda_base}/bin:${PATH} . activate base
fi
if [ -n "${conda_env}" ]; then
if ! type conda >& /dev/null; then
echo "Error: 'conda' not available. Please check your installation"
exit 1
if [ "$(type conda | head -n 1)" != "conda is a function" ]; then
if [ -z "${conda_base}" ]; then
echo "Must specify the Conda base directory"
echo
usage
fi
source ${conda_base}/etc/profile.d/conda.sh
fi
conda activate ${conda_env}
elif [ -z "${CONDA_PREFIX}" ]; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment