source: tests/scripts/checkpo.sh @ 6bb1505d

Last change on this file since 6bb1505d was 683ce32, checked in by kytv <kytv@…>, 7 years ago

testscripts build target: check shell scripts for validity

(also adding missing shebang lines)

  • Property mode set to 100755
File size: 751 bytes
Line 
1#!/bin/sh
2#
3# Run 'msgfmt -c' on all .po files
4# Returns nonzero on failure
5#
6# zzz 2011-02
7# public domain
8#
9
10cd `dirname $0`/../..
11
12DIRS="\
13  apps/routerconsole/locale \
14  apps/routerconsole/locale-news \
15  apps/i2ptunnel/locale \
16  apps/i2ptunnel/locale-proxy \
17  apps/i2psnark/locale \
18  apps/susidns/locale \
19  apps/susimail/locale \
20  apps/desktopgui/locale \
21  installer/resources/locale/po \
22  debian/po"
23
24for i in `find $DIRS -maxdepth 1 -type f -name *.po`
25do
26        echo "Checking $i ..."
27        msgfmt -c $i -o /dev/null
28        if [ $? -ne 0 ]
29        then
30                echo "********* FAILED CHECK FOR $i *************"
31                FAIL=1
32        fi
33done
34
35if [ "$FAIL" != "" ]
36then
37        echo "******** At least one file failed check *********"
38else
39        echo "All files passed"
40fi
41exit $FAIL
Note: See TracBrowser for help on using the repository browser.