diff options
author | Justin Davis <jrcd83@gmail.com> | 2012-06-06 04:14:40 +0200 |
---|---|---|
committer | Justin Davis <jrcd83@gmail.com> | 2012-06-06 04:14:40 +0200 |
commit | 0330fadcf7a3475c8c213907426da1ad5f24bdc9 (patch) | |
tree | f0a892cfb890db65710b41ec9eb410dda3ff3bec | |
parent | 6ac93dbe18f100283b5968f35da153f1a51a8f24 (diff) | |
download | genpkg-0330fadcf7a3475c8c213907426da1ad5f24bdc9.tar.gz genpkg-0330fadcf7a3475c8c213907426da1ad5f24bdc9.tar.xz |
Better error handling in genpkg's dupver().
-rwxr-xr-x | bin/genpkg | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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 } ' } |