diff options
author | Allan McRae <allan@archlinux.org> | 2014-11-09 15:53:16 +1000 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2014-11-09 15:53:16 +1000 |
commit | ecf0e37fc5b583c3694e6847e9f38edb8bae413a (patch) | |
tree | 632f564288bae0679ea1f4cf1d8e57843af3e512 | |
parent | 6029a77ac0f7667e1cc40fe0239b45e6217f0c25 (diff) | |
download | pacman-ecf0e37fc5b583c3694e6847e9f38edb8bae413a.tar.xz |
makepkg: improve stripping pkgdesc of whitespace for .PKGINFO
Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r-- | scripts/makepkg.sh.in | 7 |
1 files changed, 6 insertions, 1 deletions
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" |