Skip to content

Commit 9f2a84c

Browse files
committed
Allow override install options
It's conceivable that people may want to fork and utilize their own copy of the aviary repository. Also, depending on the environment where it's being installed, various paths and other install-time options may need to be adjusted. Allow for this by accepting non-default values for key installer options. Signed-off-by: Chris Evich <[email protected]>
1 parent a8ec9cf commit 9f2a84c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

install

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
set -euo pipefail
44

55
function run() {
6-
VERSION=1.3.2
7-
INSTALL_PATH=/var/lib
8-
AV_PATH=$INSTALL_PATH/aviary/av
9-
RELEASE_URL=https://gitlab.com/dchester/aviary.sh/-/archive/${VERSION}/aviary.sh-${VERSION}.tar.gz
6+
VERSION="${VERSION:-1.3.2}"
7+
INSTALL_PATH="${INSTALL_PATH:-/var/lib}"
8+
AV_PATH="$INSTALL_PATH/aviary/av"
9+
RELEASE_URL="${RELEASE_URL:-https://gitlab.com/dchester/aviary.sh/-/archive/${VERSION}/aviary.sh-${VERSION}.tar.gz}"
1010
INVENTORY_GIT_URL=${1:-""}
11-
CONFIG_FILE=${INSTALL_PATH}/aviary/config
11+
CONFIG_FILE="${CONFIG_FILE:-${INSTALL_PATH}/aviary/config}"
1212

1313
# check for git dependency
1414
if ! /usr/bin/which git > /dev/null; then
@@ -20,7 +20,7 @@ function run() {
2020
echo "Installing with no inventory git url; set later in $CONFIG_FILE"
2121
fi
2222

23-
if [[ -e /var/lib/aviary ]]; then
23+
if [[ -e /var/lib/aviary ]]; then
2424
echo "Found existing installation at $INSTALL_PATH; exiting"
2525
exit 1
2626
fi

0 commit comments

Comments
 (0)