From ecf0e37fc5b583c3694e6847e9f38edb8bae413a Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sun, 9 Nov 2014 15:53:16 +1000 Subject: makepkg: improve stripping pkgdesc of whitespace for .PKGINFO Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 15eaa01c..ec28bf32 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -2153,7 +2153,12 @@ write_pkginfo() { printf "basever = %s\n" "$basever" 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 "builddate = %s\n" "$builddate" printf "packager = %s\n" "$packager" -- cgit v1.2.3-70-g09d2