From 8a0085f0f890746f463104f4e78fef46b2c997e5 Mon Sep 17 00:00:00 2001 From: Janek Bevendorff Date: Fri, 7 Jul 2017 17:43:15 +0200 Subject: [PATCH] Query lupdate-qt5 first and fall back to lupdate if it does not exist --- share/translations/update.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/share/translations/update.sh b/share/translations/update.sh index c2cdeacb9..134d7b996 100755 --- a/share/translations/update.sh +++ b/share/translations/update.sh @@ -40,8 +40,14 @@ cd "${BASEDIR}/../.." if $UPDATE; then echo "Updating source files..." - lupdate-qt5 -no-ui-lines -disable-heuristic similartext -locations none -no-obsolete src -ts share/translations/keepassx_en.ts - lupdate-qt5 -no-ui-lines -disable-heuristic similartext -locations none -pluralonly src -ts share/translations/keepassx_en_plurals.ts + + LUPDATE=lupdate-qt5 + command -v $LUPDATE > /dev/null + if [ $? -ne 0 ]; then + LUPDATE=lupdate + fi + $LUPDATE -no-ui-lines -disable-heuristic similartext -locations none -no-obsolete src -ts share/translations/keepassx_en.ts + $LUPDATE -no-ui-lines -disable-heuristic similartext -locations none -pluralonly src -ts share/translations/keepassx_en_plurals.ts echo fi