This repository has been archived on 2021-07-03. You can view files and clone it, but cannot push or open issues or pull requests.
abra/installer/installer

31 lines
660 B
Bash
Executable File

#!/bin/bash
ABRA_VERSION="0.5.0"
GIT_URL="https://git.autonomic.zone/coop-cloud/abra"
ABRA_SRC="$GIT_URL/raw/tag/$ABRA_VERSION/abra"
function install_abra_release {
mkdir -p "$HOME/.local/bin"
curl "$ABRA_SRC" > "$HOME/.local/bin/abra"
chmod +x "$HOME/.local/bin/abra"
echo "abra installed to $HOME/.local/bin/abra"
}
function install_abra_dev {
mkdir -p "$HOME/.abra/"
git clone "$GIT_URL" "$HOME/.abra/src"
mkdir -p "$HOME/.local/bin"
ln -s "$HOME/.abra/src/abra" "$HOME/.local/bin/abra"
}
function run_installation {
if [ "$1" = "--dev" ]; then
install_abra_dev
else
install_abra_release
fi
}
run_installation "$@"
exit 0