diff options
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/templ/pbfields | 11 |
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] + } } } |