summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2014-11-09 15:53:16 +1000
committerAllan McRae <allan@archlinux.org>2014-11-09 15:53:16 +1000
commitecf0e37fc5b583c3694e6847e9f38edb8bae413a (patch)
tree632f564288bae0679ea1f4cf1d8e57843af3e512 /scripts
parent6029a77ac0f7667e1cc40fe0239b45e6217f0c25 (diff)
makepkg: improve stripping pkgdesc of whitespace for .PKGINFO
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in7
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"