1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-23 00:08:50 -05:00

makepkg: improve stripping pkgdesc of whitespace for .PKGINFO

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2014-11-09 15:53:16 +10:00
parent 6029a77ac0
commit ecf0e37fc5

View File

@ -2153,7 +2153,12 @@ write_pkginfo() {
printf "basever = %s\n" "$basever" printf "basever = %s\n" "$basever"
fi fi
printf "pkgdesc = %s\n" "${pkgdesc//+([[:space:]])/ }" # TODO: all fields should have this treatment
local spd="${pkgdesc//+([[:space:]])/ }"
spd=("${spd[@]#[[:space:]]}")
spd=("${spd[@]%[[:space:]]}")
printf "pkgdesc = %s\n" "$spd"
printf "url = %s\n" "$url" printf "url = %s\n" "$url"
printf "builddate = %s\n" "$builddate" printf "builddate = %s\n" "$builddate"
printf "packager = %s\n" "$packager" printf "packager = %s\n" "$packager"