mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2024-12-23 07:22:53 +00:00
41 lines
594 B
Plaintext
41 lines
594 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
die() {
|
||
|
echo "$@" >&2
|
||
|
exit 1
|
||
|
}
|
||
|
|
||
|
# version bump a pkg
|
||
|
|
||
|
do_bump() {
|
||
|
pkgname=${1%-[0-9]*}
|
||
|
pkgver=${1#${pkgname}-}
|
||
|
|
||
|
APORTS=$HOME/aports
|
||
|
|
||
|
set -e
|
||
|
|
||
|
cd $APORTS/*/$pkgname
|
||
|
section=${PWD%/*}
|
||
|
section=${section##*/}
|
||
|
|
||
|
msg="$section/$pkgname: upgrade to $pkgver"
|
||
|
echo "$msg"
|
||
|
|
||
|
( . ./APKBUILD; type package | grep -q function ) || die "package() missing"
|
||
|
|
||
|
sed -i -e "s/^pkgver=.*/pkgver=$pkgver/" \
|
||
|
-e "s/^pkgrel=.*/pkgrel=0/" \
|
||
|
APKBUILD
|
||
|
|
||
|
abuild -r checksum all || exit 1
|
||
|
|
||
|
git add APKBUILD
|
||
|
git commit -m"$msg"
|
||
|
}
|
||
|
|
||
|
while [ $# -gt 0 ]; do
|
||
|
( do_bump "$1" ) || exit 1
|
||
|
shift
|
||
|
done
|