diff options
author | Dubiousjim <dubiousjim@gmail.com> | 2013-07-05 00:21:16 -0400 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-07-09 06:44:01 +0000 |
commit | db1314ac55df59e1fbecdae280cf2b4c1784dd5a (patch) | |
tree | f94dc44cf791559b3291a45d8470bba3f2423610 /apkgrel.in | |
parent | 144ee3f113ffc73188c6cdc1682b908f6e28cba6 (diff) | |
download | abuild-db1314ac55df59e1fbecdae280cf2b4c1784dd5a.tar.gz abuild-db1314ac55df59e1fbecdae280cf2b4c1784dd5a.tar.bz2 abuild-db1314ac55df59e1fbecdae280cf2b4c1784dd5a.tar.xz abuild-db1314ac55df59e1fbecdae280cf2b4c1784dd5a.zip |
various: move conf-loading and i/o to functions
Diffstat (limited to 'apkgrel.in')
-rw-r--r-- | apkgrel.in | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -6,7 +6,15 @@ # Distributed under GPL-2 # -program=${0##*/} +abuild_ver=@VERSION@ +datadir=@datadir@ + +if ! [ -f "$datadir/functions.sh" ]; then + echo "$datadir/functions.sh: not found" >&2 + exit 1 +fi +. "$datadir/functions.sh" + do_show() { awk -F= '$1 == "pkgrel" { print $2 }' "$@" @@ -49,7 +57,7 @@ do_nothing() { do_usage() { cat <<__EOF__ -Usage: $program -a|-h|-s NUM|-t|-z [-f] FILE... +Usage: $prog -a|-h|-s NUM|-t|-z [-f] FILE... Commands: -a Add 1 to current pkgrel -g Only do the change on files that have clean git status |