From ec4d170683cd752d46c9c8c843457837d30e2c85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Wed, 11 Mar 2009 00:27:26 +0100 Subject: Fix the pocompile script; Use bash and not sh in shebang --- pocompile.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'pocompile.sh') diff --git a/pocompile.sh b/pocompile.sh index f25c51e..8eb9e31 100755 --- a/pocompile.sh +++ b/pocompile.sh @@ -1,32 +1,32 @@ -#!/bin/sh +#!/bin/bash # Helper script to compile all .po files in the i18n directroy into .mo files. cd i18n eme="" -if [ "$1" == "-emerge" ]; then +if [[ "$1" == "-emerge" ]]; then eme="y" shift fi -if [ $# -gt 0 ]; then +if [[ $# > 0 ]]; then langs="$@" else langs="$(ls *.po | sed 's/\.po//g')" fi -for LANG in $langs; do - ITEM=${LANG}.po +for lang in $langs; do + item=${lang}.po - if [ -f $ITEM ]; then - echo "Creating translation file for ${LANG}." + if [[ -f $item ]]; then + echo "Creating translation file for ${lang}." - if [ "$eme"x == "yx" ]; then + if [[ -n eme ]]; then mkdir mo -p - msgfmt ${ITEM} -o mo/${LANG}.mo + msgfmt ${item} -o mo/${lang}.mo else - mkdir ${LANG}/LC_MESSAGES -p - msgfmt ${ITEM} -o ${LANG}/LC_MESSAGES/portato.mo + mkdir ${lang}/LC_MESSAGES -p + msgfmt ${item} -o ${lang}/LC_MESSAGES/portato.mo fi fi done -- cgit v1.2.3