From 642029777e351e1ba87fd189f44c62467782d6a8 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Mon, 5 Sep 2022 18:43:24 -0500 Subject: [PATCH] linting --- docker/install_packages.sh | 30 +++++++++++++++--------------- home/private_bin/executable_tools | 1 - lib/conda.zsh | 22 +++++++++++----------- 3 files changed, 26 insertions(+), 27 deletions(-) diff --git a/docker/install_packages.sh b/docker/install_packages.sh index e5e2977..e65ab76 100755 --- a/docker/install_packages.sh +++ b/docker/install_packages.sh @@ -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 diff --git a/home/private_bin/executable_tools b/home/private_bin/executable_tools index f1e3b79..163d238 100644 --- a/home/private_bin/executable_tools +++ b/home/private_bin/executable_tools @@ -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" diff --git a/lib/conda.zsh b/lib/conda.zsh index d9311c6..8455962 100755 --- a/lib/conda.zsh +++ b/lib/conda.zsh @@ -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 }