summaryrefslogtreecommitdiffstats
path: root/upgpkg
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2014-07-06 21:14:51 +0200
committerFlorian Pritz <bluewind@xinu.at>2014-07-06 21:14:51 +0200
commit4da4c0d678df2b9451480f0a624410de50665adc (patch)
tree604b97c269b10b0a0fef348f0232e36190644c8d /upgpkg
parentde694e04560a36270b7bd90f4bca79e3a4c3550c (diff)
downloadbin-4da4c0d678df2b9451480f0a624410de50665adc.tar.gz
bin-4da4c0d678df2b9451480f0a624410de50665adc.tar.xz
upgpkg: allow to change _newpkgver from the pre_upgrade hook
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'upgpkg')
-rwxr-xr-xupgpkg4
1 files changed, 2 insertions, 2 deletions
diff --git a/upgpkg b/upgpkg
index 2c3f677..1c58296 100755
--- a/upgpkg
+++ b/upgpkg
@@ -7,7 +7,7 @@
# I place this script in the public domain.
-VERSION=0.5
+VERSION=0.6
# from makepkg
unset ALL_OFF BOLD BLUE GREEN RED YELLOW
@@ -100,7 +100,7 @@ if [[ $(vercmp $1 $pkgver) -le 0 ]]; then
warn "New version (%s) older or equal to current %s" "$1" "$pkgver"
fi
-sed -i "s/pkgver=.*$/pkgver=$1/g" PKGBUILD
+sed -i "s/pkgver=.*$/pkgver=$_newpkgver/g" PKGBUILD
sed -i "s/pkgrel=.*$/pkgrel=1/g" PKGBUILD
makepkg -g || exit 1
# replace the first checksum line with all checksums, remove all other checksums