Support ABRA_DIR in installer
This commit is contained in:
parent
10bcb68c9d
commit
656dd829ca
@ -3,6 +3,7 @@
|
|||||||
ABRA_VERSION="0.6.0"
|
ABRA_VERSION="0.6.0"
|
||||||
GIT_URL="https://git.autonomic.zone/coop-cloud/abra"
|
GIT_URL="https://git.autonomic.zone/coop-cloud/abra"
|
||||||
ABRA_SRC="$GIT_URL/raw/tag/$ABRA_VERSION/abra"
|
ABRA_SRC="$GIT_URL/raw/tag/$ABRA_VERSION/abra"
|
||||||
|
ABRA_DIR="${ABRA_DIR:+$ABRA_DIR}"
|
||||||
|
|
||||||
function install_abra_release {
|
function install_abra_release {
|
||||||
mkdir -p "$HOME/.local/bin"
|
mkdir -p "$HOME/.local/bin"
|
||||||
@ -12,13 +13,13 @@ function install_abra_release {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function install_abra_dev {
|
function install_abra_dev {
|
||||||
mkdir -p "$HOME/.abra/"
|
mkdir -p "$ABRA_DIR/"
|
||||||
if [[ ! -d "$HOME/.abra/src" ]]; then
|
if [[ ! -d "$ABRA_DIR/src" ]]; then
|
||||||
git clone "$GIT_URL" "$HOME/.abra/src"
|
git clone "$GIT_URL" "$ABRA_DIR/src"
|
||||||
fi
|
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"
|
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)"
|
echo "abra installed to $HOME/.local/bin/abra (development bleeding edge)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user