summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Davis <jrcd83@gmail.com>2012-05-15 18:47:20 +0200
committerJustin Davis <jrcd83@gmail.com>2012-05-15 18:47:20 +0200
commit296d7c4ad39fe4b0da0a08f6c16af7387b581fb5 (patch)
tree308045f4aa0622f389232655d48735e94ec26572
parent7fd10a393b2b47244e202f2c697da659db5bd3f6 (diff)
downloadgenpkg-296d7c4ad39fe4b0da0a08f6c16af7387b581fb5.tar.gz
genpkg-296d7c4ad39fe4b0da0a08f6c16af7387b581fb5.tar.xz
Duplicate the version in the prepkg step of genpkg.
-rwxr-xr-xbin/genpkg8
1 files 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