From 777201bba2094d8e21137404217091e244d4127f Mon Sep 17 00:00:00 2001 From: Matthias Hoffmann Date: Tue, 13 Aug 2019 09:25:05 +0200 Subject: [PATCH] Check for correct path in compile.sh --- locales/compile.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) mode change 100644 => 100755 locales/compile.sh diff --git a/locales/compile.sh b/locales/compile.sh old mode 100644 new mode 100755 index 0783f88..36f7260 --- a/locales/compile.sh +++ b/locales/compile.sh @@ -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