From 48eb605a68407bad6d8cec44faa32a020783a1fd Mon Sep 17 00:00:00 2001 From: zzz Date: Fri, 24 Aug 2018 11:58:35 +0000 Subject: [PATCH] checkpo script --- checkpo.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 checkpo.sh diff --git a/checkpo.sh b/checkpo.sh new file mode 100755 index 00000000..34c08c70 --- /dev/null +++ b/checkpo.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# +# Run 'msgfmt -c' on all .po files +# Returns nonzero on failure +# +# zzz 2011-02 +# public domain +# + +DIRS=i2p2www/translations/*/LC_MESSAGES + +for i in `find $DIRS -maxdepth 1 -type f -name \*.po` +do + echo "Checking $i ..." + msgfmt -c $i -o /dev/null + if [ $? -ne 0 ] + then + echo "********* FAILED CHECK FOR $i *************" + FAIL=1 + fi +done + +if [ "$FAIL" != "" ] +then + echo "******** At least one file failed check *********" +else + echo "All files passed" +fi +exit $FAIL