From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthias Fischer To: development@lists.ipfire.org Subject: [PATCH 4/4] Cleaning the lang files: slighty tuned bash scripts Date: Sun, 14 Jan 2018 20:41:59 +0100 Message-ID: <20180114194159.2004-4-matthias.fischer@ipfire.org> In-Reply-To: <20180114194159.2004-1-matthias.fischer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7849949155283665916==" List-Id: --===============7849949155283665916== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Patch 4: 'update-lang-cache': now produces some output in console, fixed a double slas= h. 'check_langs.sh': considers all languages in logging, starts with 'de'. Signed-off-by: Matthias Fischer --- src/scripts/update-lang-cache | 4 ++-- tools/check_langs.sh | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/scripts/update-lang-cache b/src/scripts/update-lang-cache index 971664ee2..17485a5dc 100644 --- a/src/scripts/update-lang-cache +++ b/src/scripts/update-lang-cache @@ -1,3 +1,3 @@ #!/bin/sh -perl -e "require '//var/ipfire/lang.pl'; &Lang::BuildCacheLang" - +echo "Rebuilding language cache..." +perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang" diff --git a/tools/check_langs.sh b/tools/check_langs.sh index 80d3f2e83..82873f9a6 100755 --- a/tools/check_langs.sh +++ b/tools/check_langs.sh @@ -25,21 +25,19 @@ if [ ! -d ./langs/ ]; then exit 1 fi =20 -cat ./langs/en/cgi-bin/en.pl | grep \'.*\' | awk -F\' '{print $2}'| sort > /= tmp/en_cgi-bin.$$ +cat ./langs/de/cgi-bin/de.pl | grep \'.*\' | awk -F\' '{print $2}'| sort > /= tmp/de_cgi-bin.$$ =20 -for i in ./langs/*; do - [ -d "${i}" ] || continue +for i in ./langs/en ./langs/fr ./langs/es ./langs/it ./langs/nl ./langs/pl .= /langs/ru ./langs/tr; do language=3D`echo "$i" | awk -F/ '{ print $3 }'` - [ "${language}" =3D "en" ] && continue =20 echo "##################################################################= ##########" echo "# Checking cgi-bin translations for language: ${language} = #" echo "##################################################################= ##########" cat ./langs/${language}/cgi-bin/${language}.pl | grep \'.*\' | awk -F\' = '{print $2}' | sort | \ - diff /tmp/en_cgi-bin.$$ - | grep \< + diff /tmp/de_cgi-bin.$$ - | grep \< done =20 -rm -f /tmp/en_cgi-bin.$$ +rm -f /tmp/de_cgi-bin.$$ =20 exit 0 =20 --=20 2.15.1 --===============7849949155283665916==--