diff --git a/deploy.sh b/deploy.sh index 8c9481c..df31969 100755 --- a/deploy.sh +++ b/deploy.sh @@ -39,8 +39,21 @@ if [[ "${SKIP_PIP:-0}" != "1" ]]; then fi if [[ -d "locale" ]]; then - echo "==> Übersetzungen kompilieren" - "$PY" manage.py compilemessages + if ! command -v msgfmt >/dev/null 2>&1; then + if command -v apt-get >/dev/null 2>&1 && [[ "$(id -u)" == "0" ]]; then + echo "==> msgfmt/gettext fehlt, installiere gettext" + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends gettext + else + echo "==> msgfmt/gettext fehlt und kann nicht automatisch installiert werden" + fi + fi + if command -v msgfmt >/dev/null 2>&1; then + echo "==> Übersetzungen kompilieren" + "$PY" manage.py compilemessages + else + echo "==> Übersetzungen überspringen: msgfmt/gettext ist nicht installiert" + fi fi echo "==> Django Checks"