summaryrefslogtreecommitdiffstats
path: root/bin/templ
diff options
context:
space:
mode:
authorJustin Davis <jrcd83@gmail.com>2011-08-18 15:55:49 +0200
committerJustin Davis <jrcd83@gmail.com>2011-08-18 15:55:49 +0200
commit29683fb856dcf8c47722f201129ed202e2332d73 (patch)
tree5a7b95d5f2ece81c49737a4ebfbf30d34f7380e8 /bin/templ
parent10b03ac633bf2648af34b9ac2da1a2eb0bfb90f3 (diff)
downloadgenpkg-29683fb856dcf8c47722f201129ed202e2332d73.tar.gz
genpkg-29683fb856dcf8c47722f201129ed202e2332d73.tar.xz
Avoid printing PKGBUILD fields with empty values.
Diffstat (limited to 'bin/templ')
-rwxr-xr-xbin/templ/pbfields2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/templ/pbfields b/bin/templ/pbfields
index a142c64..67343e7 100755
--- a/bin/templ/pbfields
+++ b/bin/templ/pbfields
@@ -16,6 +16,8 @@ BEGIN {
FS = "\n"; RS = ""; OFS = "="; ORS = "\n";
}
+NF < 2 { next }
+
$1 ~ /depends$|conflicts|provides/ {
for (i=2; i<=NF; i++) $i = sprintf("'%s'", $i)
}