summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJustin Davis <jrcd83@gmail.com>2011-12-29 22:42:58 +0100
committerJustin Davis <jrcd83@gmail.com>2011-12-29 22:42:58 +0100
commit39f0c4e5b6a3dd8780c87490f0c9f57311b55229 (patch)
treecdc9873b0c94ded5ed6efb21634d731130217ba5 /lib
parent6c772cdc1b485e39127f0e9f216dd343ee214cdb (diff)
downloadgenpkg-39f0c4e5b6a3dd8780c87490f0c9f57311b55229.tar.gz
genpkg-39f0c4e5b6a3dd8780c87490f0c9f57311b55229.tar.xz
Add pkgverfmt value for use by pbfields.
Diffstat (limited to 'lib')
-rwxr-xr-xlib/templ/pbfields11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/templ/pbfields b/lib/templ/pbfields
index 247b18c..18155a0 100755
--- a/lib/templ/pbfields
+++ b/lib/templ/pbfields
@@ -29,6 +29,8 @@ $1 == "pkgdesc" {
$2 = sprintf("\"%s\"", $2)
}
+$1 == "pkgverfmt" { pkgverfmt = $2 }
+
strfield[$1] { output[$1] = $2 }
arrfield[$1] {
@@ -42,9 +44,14 @@ END {
print ""
OFS = "="; ORS = "\n";
- for(i=1; i<=max; i++) {
+ for(i=1; i<=max; i++){
name = fields[i]
- if(name in output) print name, output[name]
+ if(name in output){
+ if(name == "pkgver" && pkgverfmt){
+ output["pkgver"] = sprintf(pkgverfmt, output["pkgver"])
+ }
+ print name, output[name]
+ }
}
}