summaryrefslogtreecommitdiff
path: root/pocompile.sh
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-03-11 00:39:42 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-03-11 00:39:42 +0100
commit48470eb1077a1a3214b7a0b429212d11921e41ab (patch)
tree3969de2d50e3659cd3b1a049236f38212f669922 /pocompile.sh
parentec4d170683cd752d46c9c8c843457837d30e2c85 (diff)
downloadportato-48470eb1077a1a3214b7a0b429212d11921e41ab.tar.gz
portato-48470eb1077a1a3214b7a0b429212d11921e41ab.tar.bz2
portato-48470eb1077a1a3214b7a0b429212d11921e41ab.zip
Fix the pocompile script #2; Do not install anything if no arguments are given during emerge
Diffstat (limited to '')
-rwxr-xr-xpocompile.sh13
1 files changed, 9 insertions, 4 deletions
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