From b894a46800fa96f91435e676608f86472c8e21c6 Mon Sep 17 00:00:00 2001 From: David Tiersch Date: Sat, 9 Aug 2014 13:44:50 +0200 Subject: [PATCH] Fixed logic error in i18n-gen Script: Check for correct #argument size before working on them --- i18n-gen.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/i18n-gen.sh b/i18n-gen.sh index c55fdd5f..a530281e 100755 --- a/i18n-gen.sh +++ b/i18n-gen.sh @@ -34,13 +34,13 @@ function gen_pot() { xgettext --language=Python --keyword=_ --output=${ROOT}i18n/glances.pot `find ${ROOT}glances/ -name "*.py"` } -OPERATION="$1" -shift - -if [ -z "$1" ]; then +if [ $# != 2 ]; then usage fi +OPERATION="$1" +shift + case "$OPERATION" in init) # If there is already a language file for specified language there is no need to generate a new one