build: i18n-sync.sh: fix i18n-update.pl invocation
authorJo-Philipp Wich <jo@mein.io>
Thu, 22 Jul 2021 14:31:43 +0000 (16:31 +0200)
committerJo-Philipp Wich <jo@mein.io>
Thu, 22 Jul 2021 14:32:35 +0000 (16:32 +0200)
Fixes: 4d3c0f347c ("build: i18n-sync.sh: allow restricting to directory")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
build/i18n-sync.sh

index ada3f3cb48caf41c37118ef7b1b88c19bf7b2935..9a3060a42d9342938b4f511cae475083432c1431 100755 (executable)
@@ -15,4 +15,10 @@ find "${1:-.}" -name '*.pot' -and -not -name base.pot | \
                echo "done"
        done
 
-./build/i18n-update.pl "${1:-./*/*/po}"
+if [ -n "$1" ]; then
+       find "$1" -path '*/templates/*.pot' -printf '%h ' | \
+               xargs -r -n 1 dirname | \
+               xargs -r -n 1 ./build/i18n-update.pl
+else
+       ./build/i18n-update.pl
+fi