diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2019-11-07 11:28:37 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-11-07 11:42:23 +0000 |
commit | c486b3b4f38719bba8e97b7628507f90cf26631f (patch) | |
tree | 03d808f7db35cf1820ad4713db21448f382eff24 | |
parent | f3dc428ea08900f65fbd24586ae841e1bc687520 (diff) | |
download | abuild-c486b3b4f38719bba8e97b7628507f90cf26631f.tar.gz abuild-c486b3b4f38719bba8e97b7628507f90cf26631f.tar.bz2 abuild-c486b3b4f38719bba8e97b7628507f90cf26631f.tar.xz abuild-c486b3b4f38719bba8e97b7628507f90cf26631f.zip |
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
-rw-r--r-- | abuild-keygen.in | 2 | ||||
-rw-r--r-- | abuild-sign.in | 2 | ||||
-rw-r--r-- | abuild.in | 2 | ||||
-rw-r--r-- | abump.in | 2 | ||||
-rw-r--r-- | apkgrel.in | 2 | ||||
-rw-r--r-- | buildlab.in | 2 | ||||
-rw-r--r-- | checkapk.in | 2 | ||||
-rw-r--r-- | newapkbuild.in | 2 | ||||
-rw-r--r-- | tests/abuild.bats | 1 |
9 files changed, 9 insertions, 8 deletions
diff --git a/abuild-keygen.in b/abuild-keygen.in index 0d061bd..b474309 100644 --- a/abuild-keygen.in +++ b/abuild-keygen.in @@ -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 diff --git a/abuild-sign.in b/abuild-sign.in index eb345b3..474d9dd 100644 --- a/abuild-sign.in +++ b/abuild-sign.in @@ -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 @@ -8,7 +8,7 @@ # program_version=@VERSION@ -sharedir=@sharedir@ +sharedir=${ABUILD_SHAREDIR:-@sharedir@} abuild_path=$(readlink -f $0) git=$(command -v git) || git=true @@ -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 @@ -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 diff --git a/buildlab.in b/buildlab.in index 19d5be1..0b4da5d 100644 --- a/buildlab.in +++ b/buildlab.in @@ -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"} diff --git a/checkapk.in b/checkapk.in index 1761bb7..f15a079 100644 --- a/checkapk.in +++ b/checkapk.in @@ -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 diff --git a/newapkbuild.in b/newapkbuild.in index f50276b..5816578 100644 --- a/newapkbuild.in +++ b/newapkbuild.in @@ -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 diff --git a/tests/abuild.bats b/tests/abuild.bats index 159762d..c3e19ce 100644 --- a/tests/abuild.bats +++ b/tests/abuild.bats @@ -1,5 +1,6 @@ setup() { export ABUILD=../abuild + export ABUILD_SHAREDIR=$PWD/.. } @test "help text" { |