summaryrefslogtreecommitdiff
path: root/abump.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-02-14 14:53:05 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-02-14 14:53:05 +0000
commit52d6af779e82ef9ca1ef154a1aca6a7b7f25b418 (patch)
treede076a10812a672e0f70d66155e038949af7cfda /abump.in
parent817db0ea98b228af80084ed898287a3b24748cdc (diff)
downloadabuild-52d6af779e82ef9ca1ef154a1aca6a7b7f25b418.tar.gz
abuild-52d6af779e82ef9ca1ef154a1aca6a7b7f25b418.tar.bz2
abuild-52d6af779e82ef9ca1ef154a1aca6a7b7f25b418.tar.xz
abuild-52d6af779e82ef9ca1ef154a1aca6a7b7f25b418.zip
abump: add -s option for security updates
Diffstat (limited to 'abump.in')
-rwxr-xr-xabump.in18
1 files changed, 12 insertions, 6 deletions
diff --git a/abump.in b/abump.in
index 03d1bd0..9d310a3 100755
--- a/abump.in
+++ b/abump.in
@@ -10,18 +10,22 @@ die() {
# version bump a pkg
do_bump() {
- pkgname=${1%-[0-9]*}
- pkgver=${1#${pkgname}-}
+ local pkgname=${1%-[0-9]*}
+ local pkgver=${1#${pkgname}-}
APORTS=$HOME/aports
set -e
cd $APORTS/*/$pkgname || return 1
- section=${PWD%/*}
+ local section=${PWD%/*} upgrade="upgrade" cve=
section=${section##*/}
+ if [ -n "$cvelist" ]; then
+ upgrade="security upgrade"
+ cve=" ($cvelist)"
+ fi
- msg="$section/$pkgname: upgrade to $pkgver"
+ msg="$section/$pkgname: $upgrade to ${pkgver}${cve}"
echo "$msg"
( . ./APKBUILD; type package | grep -q function ) || die "package() missing"
@@ -38,21 +42,23 @@ do_bump() {
usage() {
echo "$program - utility to bump pkgver in APKBUILDs"
- echo "usage: $program [-hR]"
+ echo "usage: $program [-hR] [-s CVE-1,CVE-2,...]"
echo ""
echo " -h show this help"
echo " -R run abuild with -R for recursive building"
echo " -k keep existing packages"
+ echo " -s security update"
exit 0
}
keep=
recursive="-r"
-while getopts "hkR" opt; do
+while getopts "hkRs:" opt; do
case $opt in
h) usage;;
k) keep="-k";;
R) recursive="-R";;
+ s) cvelist="$OPTARG";;
esac
done
shift $(( $OPTIND - 1))