From 656dd829caca2a134b1cb8af8e84f8cdabebac71 Mon Sep 17 00:00:00 2001 From: 3wc <3wc.git@doesthisthing.work> Date: Wed, 7 Apr 2021 14:33:17 +0200 Subject: [PATCH] Support ABRA_DIR in installer --- deploy/install.abra.autonomic.zone/installer | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/deploy/install.abra.autonomic.zone/installer b/deploy/install.abra.autonomic.zone/installer index e95b4da..8b10983 100755 --- a/deploy/install.abra.autonomic.zone/installer +++ b/deploy/install.abra.autonomic.zone/installer @@ -3,6 +3,7 @@ ABRA_VERSION="0.6.0" GIT_URL="https://git.autonomic.zone/coop-cloud/abra" ABRA_SRC="$GIT_URL/raw/tag/$ABRA_VERSION/abra" +ABRA_DIR="${ABRA_DIR:+$ABRA_DIR}" function install_abra_release { mkdir -p "$HOME/.local/bin" @@ -12,13 +13,13 @@ function install_abra_release { } function install_abra_dev { - mkdir -p "$HOME/.abra/" - if [[ ! -d "$HOME/.abra/src" ]]; then - git clone "$GIT_URL" "$HOME/.abra/src" + mkdir -p "$ABRA_DIR/" + if [[ ! -d "$ABRA_DIR/src" ]]; then + git clone "$GIT_URL" "$ABRA_DIR/src" fi - ( cd "$HOME/.abra/src" && git pull origin main && cd -) + (cd "$ABRA_DIR/src" && git pull origin main && cd - || exit) mkdir -p "$HOME/.local/bin" - ln -sf "$HOME/.abra/src/abra" "$HOME/.local/bin/abra" + ln -sf "$ABRA_DIR/src/abra" "$HOME/.local/bin/abra" echo "abra installed to $HOME/.local/bin/abra (development bleeding edge)" }