mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-09 04:57:59 -05:00
db_write cleanup: only write non-empty fields
This commit is contained in:
parent
5aa5142815
commit
de000682e6
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# gensync
|
# 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
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -94,9 +94,11 @@ db_write_entry()
|
|||||||
echo "%VERSION%" >>desc
|
echo "%VERSION%" >>desc
|
||||||
echo "$pkgver-$pkgrel" >>desc
|
echo "$pkgver-$pkgrel" >>desc
|
||||||
echo "" >>desc
|
echo "" >>desc
|
||||||
echo "%DESC%" >>desc
|
if [ -n $pkgdesc ]; then
|
||||||
echo "$pkgdesc" >>desc
|
echo "%DESC%" >>desc
|
||||||
echo "" >>desc
|
echo "$pkgdesc" >>desc
|
||||||
|
echo "" >>desc
|
||||||
|
fi
|
||||||
if [ ${#groups[*]} -gt 0 ]; then
|
if [ ${#groups[*]} -gt 0 ]; then
|
||||||
echo "%GROUPS%" >>desc
|
echo "%GROUPS%" >>desc
|
||||||
for it in "${groups[@]}"; do
|
for it in "${groups[@]}"; do
|
||||||
@ -104,9 +106,11 @@ db_write_entry()
|
|||||||
done
|
done
|
||||||
echo "" >>desc
|
echo "" >>desc
|
||||||
fi
|
fi
|
||||||
echo "%CSIZE%" >>desc
|
if [ -n $csize ]; then
|
||||||
echo "$csize" >>desc
|
echo "%CSIZE%" >>desc
|
||||||
echo "" >>desc
|
echo "$csize" >>desc
|
||||||
|
echo "" >>desc
|
||||||
|
fi
|
||||||
if [ ! -z $pkgmd5sum ]; then
|
if [ ! -z $pkgmd5sum ]; then
|
||||||
echo "%MD5SUM%" >>desc
|
echo "%MD5SUM%" >>desc
|
||||||
echo "$pkgmd5sum" >>desc
|
echo "$pkgmd5sum" >>desc
|
||||||
|
Loading…
Reference in New Issue
Block a user