summaryrefslogtreecommitdiff
path: root/scripts/gensync
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2006-02-11 07:17:44 +0000
committerAurelien Foret <aurelien@archlinux.org>2006-02-11 07:17:44 +0000
commitde000682e664347f8ec51986a761f2baf27edbc8 (patch)
treec1e3475394d90109fb63f91434afb8931a100b49 /scripts/gensync
parent5aa51428150b880e694d039b171ee6f8a597dbd8 (diff)
db_write cleanup: only write non-empty fields
Diffstat (limited to 'scripts/gensync')
-rwxr-xr-xscripts/gensync18
1 files changed, 11 insertions, 7 deletions
diff --git a/scripts/gensync b/scripts/gensync
index e51d3069..8dff8884 100755
--- a/scripts/gensync
+++ b/scripts/gensync
@@ -2,7 +2,7 @@
#
# gensync
#
-# Copyright (c) 2002-2005 by Judd Vinet <jvinet@zeroflux.org>
+# Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -94,9 +94,11 @@ db_write_entry()
echo "%VERSION%" >>desc
echo "$pkgver-$pkgrel" >>desc
echo "" >>desc
- echo "%DESC%" >>desc
- echo "$pkgdesc" >>desc
- echo "" >>desc
+ if [ -n $pkgdesc ]; then
+ echo "%DESC%" >>desc
+ echo "$pkgdesc" >>desc
+ echo "" >>desc
+ fi
if [ ${#groups[*]} -gt 0 ]; then
echo "%GROUPS%" >>desc
for it in "${groups[@]}"; do
@@ -104,9 +106,11 @@ db_write_entry()
done
echo "" >>desc
fi
- echo "%CSIZE%" >>desc
- echo "$csize" >>desc
- echo "" >>desc
+ if [ -n $csize ]; then
+ echo "%CSIZE%" >>desc
+ echo "$csize" >>desc
+ echo "" >>desc
+ fi
if [ ! -z $pkgmd5sum ]; then
echo "%MD5SUM%" >>desc
echo "$pkgmd5sum" >>desc