allow override sharedir for testing

Aloow overrid sharedir with global ABUILD_SHAREDIR so we test the local
functions.sh instead of a system installed functions.sh
This commit is contained in:
Natanael Copa 2019-11-07 11:28:37 +00:00
parent f3dc428ea0
commit c486b3b4f3
9 changed files with 9 additions and 8 deletions

View File

@ -7,7 +7,7 @@
#
program_version=@VERSION@
sharedir=@sharedir@
sharedir=${ABUILD_SHAREDIR:-@sharedir@}
if ! [ -f "$sharedir/functions.sh" ]; then
echo "$sharedir/functions.sh: not found" >&2

View File

@ -7,7 +7,7 @@
#
program_version=@VERSION@
sharedir=@sharedir@
sharedir=${ABUILD_SHAREDIR:-@sharedir@}
if ! [ -f "$sharedir/functions.sh" ]; then
echo "$sharedir/functions.sh: not found" >&2

View File

@ -8,7 +8,7 @@
#
program_version=@VERSION@
sharedir=@sharedir@
sharedir=${ABUILD_SHAREDIR:-@sharedir@}
abuild_path=$(readlink -f $0)
git=$(command -v git) || git=true

View File

@ -7,7 +7,7 @@
#
program_version=@VERSION@
sharedir=@sharedir@
sharedir=${ABUILD_SHAREDIR:-@sharedir@}
if ! [ -f "$sharedir/functions.sh" ]; then
echo "$sharedir/functions.sh: not found" >&2

View File

@ -7,7 +7,7 @@
#
program_version=@VERSION@
sharedir=@sharedir@
sharedir=${ABUILD_SHAREDIR:-@sharedir@}
if ! [ -f "$sharedir/functions.sh" ]; then
echo "$sharedir/functions.sh: not found" >&2

View File

@ -3,7 +3,7 @@
program_version=@VERSION@
sysconfdir=@sysconfdir@
abuildrepo=/var/lib/buildlab/result
sharedir=@sharedir@
sharedir=${ABUILD_SHAREDIR:-@sharedir@}
BUILD_BASE="build-base"
SUDO=${SUDO:-"sudo"}

View File

@ -7,7 +7,7 @@
#
program_version=@VERSION@
sharedir=@sharedir@
sharedir=${ABUILD_SHAREDIR:-@sharedir@}
if ! [ -f "$sharedir/functions.sh" ]; then
echo "$sharedir/functions.sh: not found" >&2

View File

@ -7,7 +7,7 @@
#
program_version=@VERSION@
sharedir=@sharedir@
sharedir=${ABUILD_SHAREDIR:-@sharedir@}
if ! [ -f "$sharedir/functions.sh" ]; then
echo "$sharedir/functions.sh: not found" >&2

View File

@ -1,5 +1,6 @@
setup() {
export ABUILD=../abuild
export ABUILD_SHAREDIR=$PWD/..
}
@test "help text" {