From 6cc335eafe994ac26c60aa3bce0c8fdfba70fe13 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 25 Dec 2020 15:23:14 +0100 Subject: [PATCH] Tweak config management to allow defining parameters through inline bash variables --- lib/common.sh | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/lib/common.sh b/lib/common.sh index 6bbde22..7a41c84 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -1,25 +1,22 @@ #!/bin/bash -ARCH="amd64" -DIST="buster" - -# Yunohost version: stable, testing or unstable -YNH_BRANCH="stable" - -# Admin password +# Yunohost install parameters YUNO_PWD="admin" - -# Domaines de test DOMAIN="domain.tld" SUBDOMAIN="sub.$DOMAIN" - -# User de test TEST_USER="package_checker" [[ -e "./config" ]] && source "./config" +ARCH=${ARCH:-amd64} +DIST=${DIST:-buster} + +# Yunohost version: stable, testing or unstable +YNH_BRANCH=${YNH_BRANCH:-stable} + LXC_BASE="ynh-appci-$DIST-$ARCH-$YNH_BRANCH-base" LXC_NAME="ynh-appci-$DIST-$ARCH-$YNH_BRANCH-test" +YNH_BRANCH="-d $YNH_BRANCH" readonly lock_file="./pcheck.lock"