Check for correct path in compile.sh

This commit is contained in:
Matthias Hoffmann 2019-08-13 09:25:05 +02:00
parent 77aa0d8e7b
commit 777201bba2

16
locales/compile.sh Normal file → Executable file
View file

@ -1,11 +1,17 @@
#!/bin/bash #!/bin/bash
# This script compiles the unobot.po file for all languages. # This script compiles the unobot.po file for all languages.
function compile { if [ ${PWD##*/} = "locales" ];
cd './'$1'/LC_MESSAGES/' then
msgfmt unobot.po -o unobot.mo function compile {
cd ../../ cd './'$1'/LC_MESSAGES/'
} msgfmt unobot.po -o unobot.mo
cd ../../
};
else
echo 'Only execute this in the "locales" directory'
exit 1;
fi
# Deutsch # Deutsch
compile de_DE compile de_DE