summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--abuild-keygen.in2
-rw-r--r--abuild-sign.in6
-rwxr-xr-xabump.in10
-rw-r--r--apkgrel.in4
-rw-r--r--checkapk.in10
-rw-r--r--functions.sh.in2
6 files changed, 16 insertions, 18 deletions
diff --git a/abuild-keygen.in b/abuild-keygen.in
index bf9d105..dbedad1 100644
--- a/abuild-keygen.in
+++ b/abuild-keygen.in
@@ -32,7 +32,7 @@ get_privkey_file() {
privkey="$abuild_home/$default_name.rsa"
[ -n "$non_interactive" ] && return 0
- echo "Generating public/private rsa key pair for abuild"
+ msg "Generating public/private rsa key pair for abuild"
echo -n "Enter file in which to save the key [$privkey]: "
read line
diff --git a/abuild-sign.in b/abuild-sign.in
index 96a1826..c1a0c77 100644
--- a/abuild-sign.in
+++ b/abuild-sign.in
@@ -37,10 +37,8 @@ do_sign() {
rm -f "$tmptargz" "$sig"
chmod 644 "$tmpsigned"
mv "$tmpsigned" "$i"
- if [ -z "$quiet" ]; then
- echo "Signed $i"
- fi
- ) || die "Failed to sign $i"
+ msg "Signed $i"
+ ) || die "failed to sign $i"
done
}
diff --git a/abump.in b/abump.in
index a344780..2ae34fc 100755
--- a/abump.in
+++ b/abump.in
@@ -35,11 +35,11 @@ do_bump() {
# verify APKBUILD
(
. "$a" || exit 1
- [ "$pkgname" = "$name" ] || die "$name: APKBUILD has different \$pkgname"
- type package | grep -q function || die "$name: missing package()"
+ [ "$pkgname" = "$name" ] || die "APKBUILD has different \$pkgname for $name"
+ type package | grep -q function || die "missing package() for $name"
case $(apk version --test "$pkgver" "$ver") in
- '=') die "$pkgname: already at version $pkgver";;
- '>') die "$pkgname: already at newer version $pkgver";;
+ '=') die "$pkgname is already at version $pkgver";;
+ '>') die "$pkgname is already at newer version $pkgver";;
'<') exit 0;;
*) exit 1;;
esac
@@ -59,7 +59,7 @@ do_bump() {
fixes #${fixes#\#}
"
fi
- echo "$message"
+ msg "$message"
sed -i -e "s/^pkgver=.*/pkgver=$ver/" \
-e "s/^pkgrel=.*/pkgrel=0/" \
diff --git a/apkgrel.in b/apkgrel.in
index 7e33e34..1d178aa 100644
--- a/apkgrel.in
+++ b/apkgrel.in
@@ -25,7 +25,7 @@ show_plain() {
show_pretty() {
(
. "$1" || exit 1
- [ -n "$pkgname" ] || die "$1: no pkgname"
+ [ -n "$pkgname" ] || die "no \$pkgname for $1"
printf '%s: r%s\n' "$pkgname" "${pkgrel:-?}"
)
}
@@ -63,7 +63,7 @@ do_verify() {
for f; do
[ -d "$f" ] && f="$f/APKBUILD"
if ! grep -q '^pkgrel=[0-9]' "$f"; then
- echo "$f: Has no proper pkgrel" >&2
+ error "no proper \$pkgrel for $f"
rc=1
fi
done
diff --git a/checkapk.in b/checkapk.in
index 2953b8b..d3e2988 100644
--- a/checkapk.in
+++ b/checkapk.in
@@ -36,14 +36,14 @@ if ! [ -f "$abuild_conf" ] && ! [ -f "$abuild_userconf" ]; then
fi
if ! [ -f APKBUILD ]; then
- die 'This must be run in the directory of a built package.'
+ die 'must be run in the directory of a built package'
fi
. ./APKBUILD
startdir="$PWD"
tmpdir=$(mktemp -d -t checkpkg-script.XXXXXX)
-cd "$tmpdir" || die "Failed to create temp dir"
+cd "$tmpdir" || die "failed to create temp dir"
for i in $pkgname $subpackages; do
_pkgname=${i%:*}
@@ -57,19 +57,19 @@ for i in $pkgname $subpackages; do
break
fi
done
- [ -f "$filepath" ] || die "could not find $pkgfile"
+ [ -f "$filepath" ] || die "can't find $pkgfile"
# generate a temp repositories file with only the http repos
grep ^http: /etc/apk/repositories > $tmpdir/repositories
oldpkg=$(apk fetch --repositories-file $tmpdir/repositories --simulate 2>&1 | sed 's/^Downloading //')
if [ "${oldpkg}" = "${pkg}" ]; then
- die "The built package ($_pkgname) is the one in the repo right now!"
+ die "the built package ($_pkgname) is already in the repo"
fi
apk fetch --repositories-file $tmpdir/repositories --stdout $_pkgname \
| tar -zt | grep -v '^\.SIGN\.' | sort > filelist-$_pkgname-old \
- || die "Failed to download old pkg. Maybe run 'apk update'?"
+ || die "failed to download old pkg, maybe run 'apk update'?"
tar -ztf "$filepath" | grep -v '^\.SIGN\.' | sort > "filelist-$_pkgname"
diff --git a/functions.sh.in b/functions.sh.in
index 96b0586..a25c39a 100644
--- a/functions.sh.in
+++ b/functions.sh.in
@@ -71,7 +71,7 @@ abuild)
}
error() {
- echo "$@" >&2
+ echo "$prog: $@" >&2
}
;;
esac