This commit is contained in:
Daylin Morgan 2022-09-05 18:43:24 -05:00
parent 65593fc479
commit 642029777e
3 changed files with 26 additions and 27 deletions

View File

@ -5,20 +5,20 @@ export DEBIAN_FRONTEND=noninteractive
n=0
max=2
until [ $n -gt $max ]; do
set +e
(
apt-get update -qq &&
apt-get install -y --no-install-recommends "$@"
)
CODE=$?
set -e
if [ $CODE -eq 0 ]; then
break
fi
if [ $n -eq $max ]; then
exit $CODE
fi
echo "apt failed, retrying"
n=$((n + 1))
set +e
(
apt-get update -qq &&
apt-get install -y --no-install-recommends "$@"
)
CODE=$?
set -e
if [ $CODE -eq 0 ]; then
break
fi
if [ $n -eq $max ]; then
exit $CODE
fi
echo "apt failed, retrying"
n=$((n + 1))
done
rm -r /var/lib/apt/lists /var/cache/apt/archives

View File

@ -19,7 +19,6 @@ INSTALL_NO=${RED}✗${NORMAL}
shopt -s nullglob
BINARY_FILES=($HOME/bin/*)
export EGET_BIN=$HOME/bin
alias eget="eget --system linux/amd64"

View File

@ -24,17 +24,17 @@ fi
# >>> mamba initialize >>>
# !! Contents within this block are managed by 'mamba init' !!
export MAMBA_EXE="/home/daylin/.local/bin/micromamba";
export MAMBA_ROOT_PREFIX="/home/daylin/micromamba";
__mamba_setup="$('/home/daylin/.local/bin/micromamba' shell hook --shell zsh --prefix '/home/daylin/micromamba' 2> /dev/null)"
export MAMBA_EXE="/home/daylin/.local/bin/micromamba"
export MAMBA_ROOT_PREFIX="/home/daylin/micromamba"
__mamba_setup="$('/home/daylin/.local/bin/micromamba' shell hook --shell zsh --prefix '/home/daylin/micromamba' 2>/dev/null)"
if [ $? -eq 0 ]; then
eval "$__mamba_setup"
eval "$__mamba_setup"
else
if [ -f "/home/daylin/micromamba/etc/profile.d/micromamba.sh" ]; then
. "/home/daylin/micromamba/etc/profile.d/micromamba.sh"
else
export PATH="/home/daylin/micromamba/bin:$PATH" # extra space after export prevents interference from conda init
fi
if [ -f "/home/daylin/micromamba/etc/profile.d/micromamba.sh" ]; then
. "/home/daylin/micromamba/etc/profile.d/micromamba.sh"
else
export PATH="/home/daylin/micromamba/bin:$PATH" # extra space after export prevents interference from conda init
fi
fi
unset __mamba_setup
# <<< mamba initialize <<<
@ -52,7 +52,7 @@ snake() {
fi
else
if [[ -d $(pwd)/env ]]; then
printf 'activating project-specific env: %s\n' "${PWD##*/}/env"
printf 'activating project-specific env: %s\n' "${PWD##*/}/env"
conda activate ./env
elif [[ -d $(pwd)/venv ]]; then
echo "activating python virtualenv"
@ -62,7 +62,7 @@ snake() {
source ./.venv/bin/activate
else
echo "is there an environment to activate?"
echo "I was expecting either a conda(env) or virtualenv(venv,.venv)"
echo "I was expecting either a conda(env) or virtualenv(venv,.venv)"
fi
fi
}