linting
This commit is contained in:
parent
65593fc479
commit
642029777e
3 changed files with 26 additions and 27 deletions
|
@ -5,20 +5,20 @@ export DEBIAN_FRONTEND=noninteractive
|
||||||
n=0
|
n=0
|
||||||
max=2
|
max=2
|
||||||
until [ $n -gt $max ]; do
|
until [ $n -gt $max ]; do
|
||||||
set +e
|
set +e
|
||||||
(
|
(
|
||||||
apt-get update -qq &&
|
apt-get update -qq &&
|
||||||
apt-get install -y --no-install-recommends "$@"
|
apt-get install -y --no-install-recommends "$@"
|
||||||
)
|
)
|
||||||
CODE=$?
|
CODE=$?
|
||||||
set -e
|
set -e
|
||||||
if [ $CODE -eq 0 ]; then
|
if [ $CODE -eq 0 ]; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
if [ $n -eq $max ]; then
|
if [ $n -eq $max ]; then
|
||||||
exit $CODE
|
exit $CODE
|
||||||
fi
|
fi
|
||||||
echo "apt failed, retrying"
|
echo "apt failed, retrying"
|
||||||
n=$((n + 1))
|
n=$((n + 1))
|
||||||
done
|
done
|
||||||
rm -r /var/lib/apt/lists /var/cache/apt/archives
|
rm -r /var/lib/apt/lists /var/cache/apt/archives
|
||||||
|
|
|
@ -19,7 +19,6 @@ INSTALL_NO=${RED}✗${NORMAL}
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
BINARY_FILES=($HOME/bin/*)
|
BINARY_FILES=($HOME/bin/*)
|
||||||
|
|
||||||
|
|
||||||
export EGET_BIN=$HOME/bin
|
export EGET_BIN=$HOME/bin
|
||||||
alias eget="eget --system linux/amd64"
|
alias eget="eget --system linux/amd64"
|
||||||
|
|
||||||
|
|
|
@ -24,17 +24,17 @@ fi
|
||||||
|
|
||||||
# >>> mamba initialize >>>
|
# >>> mamba initialize >>>
|
||||||
# !! Contents within this block are managed by 'mamba init' !!
|
# !! Contents within this block are managed by 'mamba init' !!
|
||||||
export MAMBA_EXE="/home/daylin/.local/bin/micromamba";
|
export MAMBA_EXE="/home/daylin/.local/bin/micromamba"
|
||||||
export MAMBA_ROOT_PREFIX="/home/daylin/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)"
|
__mamba_setup="$('/home/daylin/.local/bin/micromamba' shell hook --shell zsh --prefix '/home/daylin/micromamba' 2>/dev/null)"
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
eval "$__mamba_setup"
|
eval "$__mamba_setup"
|
||||||
else
|
else
|
||||||
if [ -f "/home/daylin/micromamba/etc/profile.d/micromamba.sh" ]; then
|
if [ -f "/home/daylin/micromamba/etc/profile.d/micromamba.sh" ]; then
|
||||||
. "/home/daylin/micromamba/etc/profile.d/micromamba.sh"
|
. "/home/daylin/micromamba/etc/profile.d/micromamba.sh"
|
||||||
else
|
else
|
||||||
export PATH="/home/daylin/micromamba/bin:$PATH" # extra space after export prevents interference from conda init
|
export PATH="/home/daylin/micromamba/bin:$PATH" # extra space after export prevents interference from conda init
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
unset __mamba_setup
|
unset __mamba_setup
|
||||||
# <<< mamba initialize <<<
|
# <<< mamba initialize <<<
|
||||||
|
@ -52,7 +52,7 @@ snake() {
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [[ -d $(pwd)/env ]]; then
|
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
|
conda activate ./env
|
||||||
elif [[ -d $(pwd)/venv ]]; then
|
elif [[ -d $(pwd)/venv ]]; then
|
||||||
echo "activating python virtualenv"
|
echo "activating python virtualenv"
|
||||||
|
@ -62,7 +62,7 @@ snake() {
|
||||||
source ./.venv/bin/activate
|
source ./.venv/bin/activate
|
||||||
else
|
else
|
||||||
echo "is there an environment to activate?"
|
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
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue