🔀 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

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

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