From 296d7c4ad39fe4b0da0a08f6c16af7387b581fb5 Mon Sep 17 00:00:00 2001 From: Justin Davis Date: Tue, 15 May 2012 12:47:20 -0400 Subject: Duplicate the version in the prepkg step of genpkg. --- bin/genpkg | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/genpkg b/bin/genpkg index 80f5815..eac5bfa 100755 --- a/bin/genpkg +++ b/bin/genpkg @@ -102,8 +102,10 @@ do [ -d PKGTREE ] && rm -rf PKGTREE mkdir PKGTREE + # Duplicate the version in case modpkg modifies it. vervar will remove a + # redundant ver field that is the same as pkgver. trap 'rm -f PKGDATA' 1 2 15 - if PREPSPATH="$prepd" PKGVAR="$vard" prepkg "$pkg" > PKGDATA + if PREPSPATH="$prepd" PKGVAR="$vard" prepkg "$pkg" | dupver > PKGDATA then echo "$pkgd/$pkg" else @@ -115,8 +117,8 @@ do mod="$modsd/$pkg" if [ -f "$mod" -a -r "$mod" ] then - trap 'rm PKGDATA.new' 1 2 15 - if cat PKGDATA | dupver | modpkg "$mod" > PKGDATA.new + trap 'rm -f PKGDATA.new' 1 2 15 + if modpkg "$mod" < PKGDATA > PKGDATA.new then echo "Modified with $mod." 1>&2 mv PKGDATA.new PKGDATA -- cgit v1.2.3-24-g4f1b