🔀 Merge pull request #71 from ACH1980/master

Check for correct path in compile.sh
This commit is contained in:
Jannes Höke 2021-01-04 14:31:14 +01:00 committed by GitHub
commit 49581a18e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

8
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.
if [ ${PWD##*/} = "locales" ];
then
function compile { function compile {
cd './'$1'/LC_MESSAGES/' cd './'$1'/LC_MESSAGES/'
msgfmt unobot.po -o unobot.mo msgfmt unobot.po -o unobot.mo
cd ../../ cd ../../
} };
else
echo 'Only execute this in the "locales" directory'
exit 1;
fi
# Deutsch # Deutsch
compile de_DE compile de_DE