summaryrefslogtreecommitdiffstats
path: root/abuild-sign.in
diff options
context:
space:
mode:
authorDubiousjim <dubiousjim@gmail.com>2013-07-05 00:21:16 -0400
committerNatanael Copa <ncopa@alpinelinux.org>2013-07-09 06:44:01 +0000
commitdb1314ac55df59e1fbecdae280cf2b4c1784dd5a (patch)
treef94dc44cf791559b3291a45d8470bba3f2423610 /abuild-sign.in
parent144ee3f113ffc73188c6cdc1682b908f6e28cba6 (diff)
downloadabuild-db1314ac55df59e1fbecdae280cf2b4c1784dd5a.tar.bz2
abuild-db1314ac55df59e1fbecdae280cf2b4c1784dd5a.tar.xz
various: move conf-loading and i/o to functions
Diffstat (limited to 'abuild-sign.in')
-rw-r--r--abuild-sign.in19
1 files changed, 5 insertions, 14 deletions
diff --git a/abuild-sign.in b/abuild-sign.in
index 73aabc7..3260e53 100644
--- a/abuild-sign.in
+++ b/abuild-sign.in
@@ -7,16 +7,13 @@
#
abuild_ver=@VERSION@
-sysconfdir=@sysconfdir@
+datadir=@datadir@
-abuild_conf=${ABUILD_CONF:-"$sysconfdir/abuild.conf"}
-abuild_home=${ABUILD_USERDIR:-"$HOME/.abuild"}
-abuild_userconf=${ABUILD_USERCONF:-"$abuild_home/abuild.conf"}
-
-die() {
- echo "$@" >&2
+if ! [ -f "$datadir/functions.sh" ]; then
+ echo "$datadir/functions.sh: not found" >&2
exit 1
-}
+fi
+. "$datadir/functions.sh"
do_sign() {
# we are actually only interested in the name, not the file itself
@@ -52,12 +49,6 @@ usage() {
exit 1
}
-# read config
-[ -f "$abuild_conf" ] && . "$abuild_conf"
-
-# read user config if exists
-[ -f "$abuild_userconf" ] && . "$abuild_userconf"
-
privkey="$PACKAGER_PRIVKEY"
while getopts "hk:p:q" opt; do