[4/4] Cleaning the lang files: slighty tuned bash scripts
Commit Message
Patch 4:
'update-lang-cache': now produces some output in console, fixed a double slash.
'check_langs.sh': considers all languages in logging, starts with 'de'.
Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
---
src/scripts/update-lang-cache | 4 ++--
tools/check_langs.sh | 10 ++++------
2 files changed, 6 insertions(+), 8 deletions(-)
@@ -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"
@@ -25,21 +25,19 @@ if [ ! -d ./langs/ ]; then
exit 1
fi
-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.$$
-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=`echo "$i" | awk -F/ '{ print $3 }'`
- [ "${language}" = "en" ] && continue
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
-rm -f /tmp/en_cgi-bin.$$
+rm -f /tmp/de_cgi-bin.$$
exit 0