| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | |
| 3 | if [scip-shell system . . `[`. $0 != "./pull.sh" ]; then |
| 4 | echoscip-shell system . . echo. "pull.sh: Invoke this script as ./pull.sh" |
| 5 | exit 1 |
| 6 | fi |
| 7 | |
| 8 | ALL='n' |
| 9 | while [scip-shell system . . `[`. $# -gt 0 ]; do |
| 10 | if [scip-shell system . . `[`. $1 = '-a' ]; then |
| 11 | ALL='y' |
| 12 | # We must do this until java Locale class is updated... |
| 13 | mvscip-shell system . . mv. Resources_iw.po Resources_he.po |
| 14 | mvscip-shell system . . mv. Resources_iw.properties Resources_he.properties |
| 15 | mvscip-shell system . . mv. Resources_in.po Resources_id.po |
| 16 | mvscip-shell system . . mv. Resources_in.properties Resources_id.properties |
| 17 | |
| 18 | for f in Resources_*.po; do |
| 19 | f=$(exprscip-shell system . . expr. "$f" : "Resources_\(.*\).po") |
| 20 | langs="$langs $f" |
| 21 | done |
| 22 | else |
| 23 | langs="$langs $1" |
| 24 | fi |
| 25 | shift |
| 26 | done |
| 27 | |
| 28 | if [scip-shell system . . `[`. "$langs" = "" ]; then |
| 29 | echoscip-shell system . . echo. "pull.sh: Give at least one language code." |
| 30 | exit 1 |
| 31 | fi |
| 32 | |
| 33 | |
| 34 | python2 python/pull.py $langs |
| 35 | |
| 36 | if [scip-shell system . . `[`. "$ALL" = "y" ]; then |
| 37 | # We must do this until java Locale class is updated... |
| 38 | mvscip-shell system . . mv. Resources_he.po Resources_iw.po |
| 39 | mvscip-shell system . . mv. Resources_he.properties Resources_iw.properties |
| 40 | mvscip-shell system . . mv. Resources_id.po Resources_in.po |
| 41 | mvscip-shell system . . mv. Resources_id.properties Resources_in.properties |
| 42 | fi |
| 43 | |
| 44 | for lang in $langs; do |
| 45 | if [scip-shell system . . `[`. -f "Resources_$lang.po" ]; then |
| 46 | msgcatscip-shell system . . msgcat. -p Resources_$lang.po > Resources_$lang.properties |
| 47 | fi |
| 48 | done |
| 49 | |
| 50 |