[X2Go-Commits] [libx2goclient] 09/18: update-po{, t}.sh: better quoting.

git-admin at x2go.org git-admin at x2go.org
Fri Jul 12 17:48:47 CEST 2019


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository libx2goclient.

commit 6914e14ac55612bf6b52e39d01417eaa762f5bea
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Fri Jul 12 16:55:59 2019 +0200

    update-po{,t}.sh: better quoting.
---
 update-po.sh  | 20 ++++++++++----------
 update-pot.sh | 12 ++++++------
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/update-po.sh b/update-po.sh
index 7137f5a..547eb86 100755
--- a/update-po.sh
+++ b/update-po.sh
@@ -17,22 +17,22 @@
 
 GETTEXT_DOMAIN="$(grep -E '^GETTEXT_PACKAGE=' 'configure.ac' | sed -e 's/GETTEXT_PACKAGE=//')"
 
-cp po/${GETTEXT_DOMAIN}.pot po/${GETTEXT_DOMAIN}.pot~
+cp "po/${GETTEXT_DOMAIN}.pot" "po/${GETTEXT_DOMAIN}.pot~"
 
 pushd 'po/' 1>'/dev/null'
 while read lingua; do
-	if [ ! -e ${lingua}.po ]; then
-		msginit --input=${GETTEXT_DOMAIN}.pot --locale=${lingua} --no-translator --output-file=$lingua.po
+	if [ ! -e "${lingua}.po" ]; then
+		msginit --input="${GETTEXT_DOMAIN}.pot" --locale="${lingua}" --no-translator --output-file="${lingua}.po"
 	else
-		intltool-update --gettext-package ${GETTEXT_DOMAIN} $(basename ${lingua})
+		intltool-update --gettext-package "${GETTEXT_DOMAIN}" "$(basename "${lingua}")"
 	fi
 
-	sed -e 's/\.xml\.in\.h:/.xml.in:/g'	\
-	    -e 's/\.ini\.in\.h:/.ini.in:/g'	\
-	    -e 's/\.xml\.h:/.xml:/g'		\
-	    -e 's/\.ini\.h:/.ini:/g'		\
-	    -i ${lingua}.po
+	sed -e 's/\.xml\.in\.h:/.xml.in:/g' \
+	    -e 's/\.ini\.in\.h:/.ini.in:/g' \
+	    -e 's/\.xml\.h:/.xml:/g' \
+	    -e 's/\.ini\.h:/.ini:/g' \
+	    -i "${lingua}.po"
 done < 'LINGUAS'
 popd 1>'/dev/null'
 
-mv po/${GETTEXT_DOMAIN}.pot~ po/${GETTEXT_DOMAIN}.pot
+mv "po/${GETTEXT_DOMAIN}.pot~" "po/${GETTEXT_DOMAIN}.pot"
diff --git a/update-pot.sh b/update-pot.sh
index 4ff6a14..acc3865 100755
--- a/update-pot.sh
+++ b/update-pot.sh
@@ -19,10 +19,10 @@ set -x
 
 GETTEXT_DOMAIN="$(grep -E '^GETTEXT_PACKAGE=' 'configure.ac'| sed -e 's/GETTEXT_PACKAGE=//')"
 
-pushd 'po/' 1>'/dev/null' && intltool-update --gettext-package ${GETTEXT_DOMAIN} --pot && popd 1>'/dev/null'
+pushd 'po/' 1>'/dev/null' && intltool-update --gettext-package "${GETTEXT_DOMAIN}" --pot && popd 1>'/dev/null'
 
-sed -e 's/\.xml\.in\.h:/.xml.in:/g'	\
-    -e 's/\.ini\.in\.h:/.ini.in:/g'	\
-    -e 's/\.xml\.h:/.xml:/g'		\
-    -e 's/\.ini\.h:/.ini:/g'		\
-    -i po/${GETTEXT_DOMAIN}.pot
+sed -e 's/\.xml\.in\.h:/.xml.in:/g' \
+    -e 's/\.ini\.in\.h:/.ini.in:/g' \
+    -e 's/\.xml\.h:/.xml:/g' \
+    -e 's/\.ini\.h:/.ini:/g' \
+    -i "po/${GETTEXT_DOMAIN}.pot"

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git


More information about the x2go-commits mailing list