luci-base: depend on Lua (#283)
[project/luci.git] / build / i18n-sync.sh
1 #!/bin/sh
2
3 for m in */*/Makefile; do
4         if grep -qE '^PO *=' $m; then
5                 p="${m%/Makefile}"
6                 t="$(sed -ne 's/^PO *= *//p' $m)"
7
8                 case "$t" in
9                         *\ *)
10                                 echo "WARNING: Cannot handle $p" >&2
11                                 continue
12                         ;;
13                         *base*)
14                                 continue
15                         ;;
16                 esac
17
18                 if [ -f "po/templates/$t.pot" ]; then
19                         ./build/i18n-scan.pl "$p" > "po/templates/$t.pot"
20                 fi
21         fi
22 done
23
24 ./build/mkbasepot.sh
25 ./build/i18n-update.pl po