diff options
Diffstat (limited to 'abuild-keygen.in')
-rw-r--r-- | abuild-keygen.in | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/abuild-keygen.in b/abuild-keygen.in index 3cf5531..9b748d3 100644 --- a/abuild-keygen.in +++ b/abuild-keygen.in @@ -7,17 +7,14 @@ # 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"} +if ! [ -f "$datadir/functions.sh" ]; then + echo "$datadir/functions.sh: not found" >&2 + exit 1 +fi +. "$datadir/functions.sh" -# echo message unless quite mode -msg() { - [ -n "$quiet" ] && return 0 - echo "$@" -} # ask for privkey unless non-interactive mode # returns value in global $privkey @@ -107,11 +104,6 @@ usage() { exit 1 } -# read config -[ -f "$abuild_conf" ] && . "$abuild_conf" - -# read user config if exists -[ -f "$abuild_userconf" ] && . "$abuild_userconf" while getopts "ahinq" opt; do case $opt in |