forked from I2P_Developers/i2p.i2p
- Fail build if gettext fails. Change property at top of build.xml if
you don't have gettext and want the build to continue.
This commit is contained in:
@ -12,6 +12,7 @@
|
||||
CLASS=net.i2p.i2ptunnel.web.messages
|
||||
TMPFILE=build/javafiles.txt
|
||||
export TZ=UTC
|
||||
RC=0
|
||||
|
||||
if [ "$1" = "-p" ]
|
||||
then
|
||||
@ -69,15 +70,17 @@ do
|
||||
-o ${i}t
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo 'Warning - xgettext failed, not updating translations'
|
||||
echo "ERROR - xgettext failed on ${i}, not updating translations"
|
||||
rm -f ${i}t
|
||||
RC=1
|
||||
break
|
||||
fi
|
||||
msgmerge -U --backup=none $i ${i}t
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo 'Warning - msgmerge failed, not updating translations'
|
||||
echo "ERROR - msgmerge failed on ${i}, not updating translations"
|
||||
rm -f ${i}t
|
||||
RC=1
|
||||
break
|
||||
fi
|
||||
rm -f ${i}t
|
||||
@ -94,11 +97,13 @@ do
|
||||
msgfmt --java --statistics -r $CLASS -l $LG -d ../jsp/WEB-INF/classes $i
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo 'Warning - msgfmt failed, not updating translations'
|
||||
echo "ERROR - msgfmt failed on ${i}, not updating translations"
|
||||
# msgfmt leaves the class file there so the build would work the next time
|
||||
find src/WEB-INF/classes -name messages_${LG}.class -exec rm -f {} \;
|
||||
RC=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
rm -f $TMPFILE
|
||||
# todo: return failure
|
||||
exit 0
|
||||
exit $RC
|
||||
|
Reference in New Issue
Block a user