X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 8A44BDC7B0D for ; Fri, 5 Jul 2013 04:21:55 +0000 (UTC) Received: from compute6.internal (compute6.nyi.mail.srv.osa [10.202.2.46]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id BE4A5208C1 for ; Fri, 5 Jul 2013 00:21:48 -0400 (EDT) Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute6.internal (MEProxy); Fri, 05 Jul 2013 00:21:48 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=from:to:subject:date:message-id :in-reply-to:references; s=smtpout; bh=P5iLyJWWYyh2mtR9OxfoWJlnV S4=; b=U2Ui9gzfaR9BPailDClddKC6VdDuCQj1cilIREIuLapy8d9gdXBX2g9TL xfk2A9yghzqNKVsThHHHlNRTJng17F/J6+b4S81LtCfgzm/P9Tsc4DUApS21cufd mMUInFlSRo0hPRdTTn+VIYCTRjlAmVTsv/6UdKXM8trZZ9rLGE= X-Sasl-enc: 3FX5nNxrr/I3A7a/BCytnnqM5rWsz4qq74L2+1r9mFuK 1372998108 Received: from localhost (unknown [69.86.161.244]) by mail.messagingengine.com (Postfix) with ESMTPA id 7D024680204 for ; Fri, 5 Jul 2013 00:21:48 -0400 (EDT) From: Dubiousjim To: alpine-devel@lists.alpinelinux.org Subject: [alpine-devel] [PATCH 16/31] abump: move loop inside do_bump, refine locals Date: Fri, 5 Jul 2013 00:21:25 -0400 Message-Id: X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: --- abump.in | 57 +++++++++++++++++++++++++++------------------------------ 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/abump.in b/abump.in index 3b501e3..72afdbc 100755 --- a/abump.in +++ b/abump.in @@ -16,43 +16,43 @@ fi . "$datadir/functions.sh" -# version bump a pkg - +# version bump packages do_bump() { - local pkgname=${1%-[0-9]*} - local pkgver=${1#${pkgname}-} - - APORTS=$HOME/aports + local p pkgname pkgver section upgrade cve message + for p; do + pkgname=${p%-[0-9]*} + pkgver=${p#${pkgname}-} - set -e + set -e - cd $APORTS/*/$pkgname || return 1 - local section=${PWD%/*} upgrade="upgrade" cve= - section=${section##*/} - if [ -n "$cvelist" ]; then - upgrade="security upgrade" - cve=" ($cvelist)" - fi + cd $HOME/aports/*/$pkgname || exit 1 + section=${PWD%/*} upgrade="upgrade" cve= + section=${section##*/} + if [ -n "$cvelist" ]; then + upgrade="security upgrade" + cve=" ($cvelist)" + fi - message="$section/$pkgname: $upgrade to ${pkgver}${cve}" - if [ -n "$fixes" ]; then - message="$message + message="$section/$pkgname: $upgrade to ${pkgver}${cve}" + if [ -n "$fixes" ]; then + message="$message fixes #${fixes#\#} " - fi - echo "$message" + fi + echo "$message" - ( . ./APKBUILD; type package | grep -q function ) || die "package() missing" + ( . ./APKBUILD; type package | grep -q function ) || die "package() missing" - sed -i -e "s/^pkgver=.*/pkgver=$pkgver/" \ - -e "s/^pkgrel=.*/pkgrel=0/" \ - APKBUILD + sed -i -e "s/^pkgver=.*/pkgver=$pkgver/" \ + -e "s/^pkgrel=.*/pkgrel=0/" \ + APKBUILD - abuild $abuild_opts checksum all || exit 1 + abuild $abuild_opts checksum all || exit 1 - git add APKBUILD - git commit -m"$message" + git add APKBUILD + git commit -m"$message" + done } usage() { @@ -101,8 +101,5 @@ fi abuild_opts="$recursive $keep" -while [ $# -gt 0 ]; do - ( do_bump "$1" ) || exit 1 - shift -done +do_bump "$@" -- 1.8.3.1 --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---