luci-app-openvpn: fix stray uci permission warning
[project/luci.git] / build / i18n-sync.sh
index ad8c46c6ff8fd5f6646c8f7153ddbf1327b4abf6..9a3060a42d9342938b4f511cae475083432c1431 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,10 @@ find . -name '*.pot' -and -not -name base.pot | \
                echo "done"
        done
 
-./build/i18n-update.pl
+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