diff options
Diffstat (limited to 'checkapk.in')
-rw-r--r-- | checkapk.in | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/checkapk.in b/checkapk.in index 9c1d9fd..e95249e 100644 --- a/checkapk.in +++ b/checkapk.in @@ -6,24 +6,22 @@ # Distributed under GPL-2 # -die() { - echo "$@" >&2 +abuild_ver=@VERSION@ +datadir=@datadir@ + +if ! [ -f "$datadir/functions.sh" ]; then + echo "$datadir/functions.sh: not found" >&2 exit 1 -} +fi +. "$datadir/functions.sh" + -msg() { - echo "$@" -} -have_abuild_conf= -for conf in /etc/abuild.conf ~/.abuild/abuild.conf; do - if [ -f "$conf" ]; then - . $conf && have_abuild_conf=yes - fi -done -[ -z "$have_abuild_conf" ] && die "no abuild.conf found" +if ! [ -f "$abuild_conf" ] && ! [ -f "$abuild_userconf" ]; then + die "no abuild.conf found" +fi if ! [ -f APKBUILD ]; then die 'This must be run in the directory of a built package.' |