Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion create_diracosrc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
echo ''
echo '# Initialise the conda environment in a way which ignores other conda installations'
echo 'unset CONDA_SHLVL'
echo '# Silence xtrace around the micromamba hook eval (it expands to hundreds of lines)'
echo '__diracos_xtrace=0; case $- in *x*) __diracos_xtrace=1; set +x;; esac'
echo 'eval "$(PS1="${PS1:-}" ${DIRACOS}/bin/micromamba shell hook -s bash)"'
echo 'micromamba activate "$DIRACOS"'
echo '[ "$__diracos_xtrace" = 1 ] && set -x; unset __diracos_xtrace'
echo ''
echo '# Silence python warnings'
echo 'export PYTHONWARNINGS=ignore'
Expand All @@ -39,7 +42,11 @@
echo ' if [ -z "${resolvedDir}" ]; then'
echo ' return 1'
echo ' fi'
echo ' if [ -n "$(ls -A "${resolvedDir}" 2>/dev/null)" ]; then'
echo ' # Silence xtrace so a traced "ls -A" on e.g. a CA cert dir does not dump thousands of lines'
echo ' local _xt=0; case $- in *x*) _xt=1; set +x;; esac'
echo ' local _contents; _contents=$(ls -A "${resolvedDir}" 2>/dev/null)'
echo ' [ "$_xt" = 1 ] && set -x'
echo ' if [ -n "${_contents}" ]; then'
echo ' return 0'
echo ' fi'
echo ' return 1'
Expand Down