cp-po: Tweak whitespace handling
authorPeter Eisentraut <peter@eisentraut.org>
Mon, 11 Nov 2019 09:58:45 +0000 (10:58 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Mon, 11 Nov 2019 09:58:45 +0000 (10:58 +0100)
When editing AVAIL_LANGUAGES, put exactly one space after the =
instead of leaving what spaces were there before, which would result
in no whitespace when adding the first language.

cp-po

diff --git a/cp-po b/cp-po
index ac54b34a1a7b74689a9cc8d7871a065c0e3eea3c..d4ae9285697ba110228b6e01c8339b1d0f8c3458 100755 (executable)
--- a/cp-po
+++ b/cp-po
@@ -213,7 +213,7 @@ if $update_target_tree; then
        for y in $nls_mks; do
                targetdir=$(echo $y | sed 's,nls\.mk$,po,')
                langs=$(echo $(cd $targetdir && ls *.po | sed 's/\.po$//'))
-               sed -e 's/\(AVAIL_LANGUAGES.*:*= *\).*$/\1'"$langs/" $y >$y.new
+               sed -e 's/\(AVAIL_LANGUAGES.*:*=\).*$/\1 '"$langs/" $y >$y.new
                mv $y.new $y
                if $git_mode; then
                        git add $(echo "$y" | sed "s,^$destdir/,,")