summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-03-11 00:27:26 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-03-11 00:27:26 +0100
commitec4d170683cd752d46c9c8c843457837d30e2c85 (patch)
treed53fe32f46ff1d78d1dce4300c62c81ce9a52724
parent3f5b271370b9af23062f5049593541819d843108 (diff)
downloadportato-ec4d170683cd752d46c9c8c843457837d30e2c85.tar.gz
portato-ec4d170683cd752d46c9c8c843457837d30e2c85.tar.bz2
portato-ec4d170683cd752d46c9c8c843457837d30e2c85.zip
Fix the pocompile script; Use bash and not sh in shebang
-rwxr-xr-xpocompile.sh22
1 files changed, 11 insertions, 11 deletions
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