From 48470eb1077a1a3214b7a0b429212d11921e41ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Wed, 11 Mar 2009 00:39:42 +0100 Subject: Fix the pocompile script #2; Do not install anything if no arguments are given during emerge --- pocompile.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'pocompile.sh') diff --git a/pocompile.sh b/pocompile.sh index 8eb9e31..67374b7 100755 --- a/pocompile.sh +++ b/pocompile.sh @@ -11,17 +11,22 @@ fi if [[ $# > 0 ]]; then langs="$@" -else - langs="$(ls *.po | sed 's/\.po//g')" +else + # in emerge case do not install anything if nothing is given + if [[ -z $eme ]]; then + langs="$(ls *.po | sed 's/\.po//g')" + else + langs="" + fi fi -for lang in $langs; do +for lang in ${langs}; do item=${lang}.po if [[ -f $item ]]; then echo "Creating translation file for ${lang}." - if [[ -n eme ]]; then + if [[ -n $eme ]]; then mkdir mo -p msgfmt ${item} -o mo/${lang}.mo else -- cgit v1.2.3