diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-04-06 06:56:33 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-04-06 06:56:33 +0000 |
commit | e388eb1467c94b0d98acc7d81a2c3e7c99dce67f (patch) | |
tree | 1fb9a530d3180a68dee434a78a261df22d854562 /abump | |
parent | 92d947b000ca27cd446c7050dfd45c2d4fb5113f (diff) | |
download | abuild-e388eb1467c94b0d98acc7d81a2c3e7c99dce67f.tar.gz abuild-e388eb1467c94b0d98acc7d81a2c3e7c99dce67f.tar.bz2 abuild-e388eb1467c94b0d98acc7d81a2c3e7c99dce67f.tar.xz abuild-e388eb1467c94b0d98acc7d81a2c3e7c99dce67f.zip |
abump: small utility to maintain aports
Diffstat (limited to 'abump')
-rwxr-xr-x | abump | 40 |
1 files changed, 40 insertions, 0 deletions
@@ -0,0 +1,40 @@ +#!/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 |