build: i18n-sync.sh: allow restricting to directory
authorJo-Philipp Wich <jo@mein.io>
Sun, 18 Jul 2021 18:12:12 +0000 (20:12 +0200)
committerJo-Philipp Wich <jo@mein.io>
Sun, 18 Jul 2021 18:12:42 +0000 (20:12 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
build/i18n-sync.sh

index ad8c46c6ff8fd5f6646c8f7153ddbf1327b4abf6..ada3f3cb48caf41c37118ef7b1b88c19bf7b2935 100755 (executable)
@@ -5,9 +5,9 @@
        exit 1
 }
 
-./build/mkbasepot.sh
+[ -n "$1" ] || ./build/mkbasepot.sh
 
-find . -name '*.pot' -and -not -name base.pot | \
+find "${1:-.}" -name '*.pot' -and -not -name base.pot | \
        while read path; do
                dir="${path%/po/templates/*}"
                echo -n "Updating ${path#./} ... "
@@ -15,4 +15,4 @@ find . -name '*.pot' -and -not -name base.pot | \
                echo "done"
        done
 
-./build/i18n-update.pl
+./build/i18n-update.pl "${1:-./*/*/po}"