summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJustin Davis <jrcd83@gmail.com>2012-06-06 04:14:40 +0200
committerJustin Davis <jrcd83@gmail.com>2012-06-06 04:14:40 +0200
commit0330fadcf7a3475c8c213907426da1ad5f24bdc9 (patch)
treef0a892cfb890db65710b41ec9eb410dda3ff3bec /bin
parent6ac93dbe18f100283b5968f35da153f1a51a8f24 (diff)
downloadgenpkg-0330fadcf7a3475c8c213907426da1ad5f24bdc9.tar.gz
genpkg-0330fadcf7a3475c8c213907426da1ad5f24bdc9.tar.xz
Better error handling in genpkg's dupver().
Diffstat (limited to 'bin')
-rwxr-xr-xbin/genpkg5
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/genpkg b/bin/genpkg
index 047a07f..22ec225 100755
--- a/bin/genpkg
+++ b/bin/genpkg
@@ -57,15 +57,14 @@ END { exit !found }
return $?
}
-# Create an extra "ver" field in case the packager needs to modify
-# the version.
+# Create an extra "ver" field in case the packager needs to modify the pkgver.
dupver()
{
awk '
BEGIN { OFS = FS = "\n"; RS = ""; ORS = "\n\n" }
$1 == "pkgver" { pkgver = $2 }
1
-END { print "ver", pkgver }
+END { if(pkgver) print "ver", pkgver }
'
}