From 5d93ca19f88f221ea20ba9e1e85070833458b0ad Mon Sep 17 00:00:00 2001 From: zzz Date: Sat, 7 May 2016 12:57:49 +0000 Subject: [PATCH] Build: Add back the old, slow way to build bundles for gettext < 0.19 --- apps/desktopgui/build.xml | 3 +- apps/desktopgui/bundle-messages.sh | 47 +++++++++++++------ apps/i2psnark/java/build.xml | 1 + apps/i2psnark/java/bundle-messages.sh | 47 +++++++++++++------ apps/i2ptunnel/java/build.xml | 2 + apps/i2ptunnel/java/bundle-messages-proxy.sh | 47 +++++++++++++------ apps/i2ptunnel/java/bundle-messages.sh | 47 +++++++++++++------ apps/ministreaming/java/build.xml | 1 + apps/ministreaming/java/bundle-messages.sh | 47 +++++++++++++------ apps/routerconsole/java/build.xml | 3 ++ .../java/bundle-messages-countries.sh | 47 +++++++++++++------ .../java/bundle-messages-news.sh | 47 +++++++++++++------ apps/routerconsole/java/bundle-messages.sh | 47 +++++++++++++------ apps/susidns/src/build.xml | 1 + apps/susidns/src/bundle-messages.sh | 47 +++++++++++++------ apps/susimail/build.xml | 1 + apps/susimail/bundle-messages.sh | 47 +++++++++++++------ 17 files changed, 331 insertions(+), 151 deletions(-) diff --git a/apps/desktopgui/build.xml b/apps/desktopgui/build.xml index 3f6256b89..1629eeef4 100644 --- a/apps/desktopgui/build.xml +++ b/apps/desktopgui/build.xml @@ -16,6 +16,7 @@ + @@ -37,7 +38,7 @@ - + diff --git a/apps/desktopgui/bundle-messages.sh b/apps/desktopgui/bundle-messages.sh index 865460756..14b001fe7 100644 --- a/apps/desktopgui/bundle-messages.sh +++ b/apps/desktopgui/bundle-messages.sh @@ -105,24 +105,41 @@ do # only generate for non-source language echo "Generating ${CLASS}_$LG ResourceBundle..." - # convert to class files in build - TD=build/messages-src-tmp - TDX=$TD/net/i2p/desktopgui - TD2=build/messages-src - TDY=$TD2/net/i2p/desktopgui - rm -rf $TD - mkdir -p $TD $TDY - msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i + msgfmt -V | grep -q '0\.19' if [ $? -ne 0 ] then - echo "ERROR - msgfmt failed on ${i}, not updating translations" - # msgfmt leaves the class file there so the build would work the next time - find build -name messages_${LG}.class -exec rm -f {} \; - RC=1 - break + # slow way + # convert to class files in build + msgfmt --java --statistics -r $CLASS -l $LG -d build $i + if [ $? -ne 0 ] + then + echo "ERROR - msgfmt failed on ${i}, not updating translations" + # msgfmt leaves the class file there so the build would work the next time + find build -name messages_${LG}.class -exec rm -f {} \; + RC=1 + break + fi + else + # fast way + # convert to java files in build/messages-src + TD=build/messages-src-tmp + TDX=$TD/net/i2p/desktopgui + TD2=build/messages-src + TDY=$TD2/net/i2p/desktopgui + rm -rf $TD + mkdir -p $TD $TDY + msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i + if [ $? -ne 0 ] + then + echo "ERROR - msgfmt failed on ${i}, not updating translations" + # msgfmt leaves the class file there so the build would work the next time + find build -name messages_${LG}.class -exec rm -f {} \; + RC=1 + break + fi + mv $TDX/messages_$LG.java $TDY + rm -rf $TD fi - mv $TDX/messages_$LG.java $TDY - rm -rf $TD fi done rm -f $TMPFILE diff --git a/apps/i2psnark/java/build.xml b/apps/i2psnark/java/build.xml index 31f3805a1..683e81285 100644 --- a/apps/i2psnark/java/build.xml +++ b/apps/i2psnark/java/build.xml @@ -137,6 +137,7 @@ + diff --git a/apps/i2psnark/java/bundle-messages.sh b/apps/i2psnark/java/bundle-messages.sh index adbacb45a..3e2ca3507 100755 --- a/apps/i2psnark/java/bundle-messages.sh +++ b/apps/i2psnark/java/bundle-messages.sh @@ -96,24 +96,41 @@ do # only generate for non-source language echo "Generating ${CLASS}_$LG ResourceBundle..." - # convert to class files in build/obj - TD=build/messages-src-tmp - TDX=$TD/org/klomp/snark/web - TD2=build/messages-src - TDY=$TD2/org/klomp/snark/web - rm -rf $TD - mkdir -p $TD $TDY - msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i + msgfmt -V | grep -q '0\.19' if [ $? -ne 0 ] then - echo "ERROR - msgfmt failed on ${i}, not updating translations" - # msgfmt leaves the class file there so the build would work the next time - find build/obj -name messages_${LG}.class -exec rm -f {} \; - RC=1 - break + # slow way + # convert to class files in build/obj + msgfmt --java --statistics -r $CLASS -l $LG -d build/obj $i + if [ $? -ne 0 ] + then + echo "ERROR - msgfmt failed on ${i}, not updating translations" + # msgfmt leaves the class file there so the build would work the next time + find build -name messages_${LG}.class -exec rm -f {} \; + RC=1 + break + fi + else + # fast way + # convert to java files in build/messages-src + TD=build/messages-src-tmp + TDX=$TD/org/klomp/snark/web + TD2=build/messages-src + TDY=$TD2/org/klomp/snark/web + rm -rf $TD + mkdir -p $TD $TDY + msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i + if [ $? -ne 0 ] + then + echo "ERROR - msgfmt failed on ${i}, not updating translations" + # msgfmt leaves the class file there so the build would work the next time + find build/obj -name messages_${LG}.class -exec rm -f {} \; + RC=1 + break + fi + mv $TDX/messages_$LG.java $TDY + rm -rf $TD fi - mv $TDX/messages_$LG.java $TDY - rm -rf $TD fi done rm -f $TMPFILE diff --git a/apps/i2ptunnel/java/build.xml b/apps/i2ptunnel/java/build.xml index 7f3833c76..346e91920 100644 --- a/apps/i2ptunnel/java/build.xml +++ b/apps/i2ptunnel/java/build.xml @@ -123,6 +123,7 @@ + @@ -161,6 +162,7 @@ + diff --git a/apps/i2ptunnel/java/bundle-messages-proxy.sh b/apps/i2ptunnel/java/bundle-messages-proxy.sh index ac31340f7..d14b2e725 100755 --- a/apps/i2ptunnel/java/bundle-messages-proxy.sh +++ b/apps/i2ptunnel/java/bundle-messages-proxy.sh @@ -98,24 +98,41 @@ do # only generate for non-source language echo "Generating ${CLASS}_$LG ResourceBundle..." - # convert to class files in build/obj - TD=build/messages-proxy-src-tmp - TDX=$TD/net/i2p/i2ptunnel/proxy - TD2=build/messages-proxy-src - TDY=$TD2/net/i2p/i2ptunnel/proxy - rm -rf $TD - mkdir -p $TD $TDY - msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i + msgfmt -V | grep -q '0\.19' if [ $? -ne 0 ] then - echo "ERROR - msgfmt failed on ${i}, not updating translations" - # msgfmt leaves the class file there so the build would work the next time - find build/obj -name messages_${LG}.class -exec rm -f {} \; - RC=1 - break + # slow way + # convert to class files in build/obj + msgfmt --java --statistics -r $CLASS -l $LG -d build/obj $i + if [ $? -ne 0 ] + then + echo "ERROR - msgfmt failed on ${i}, not updating translations" + # msgfmt leaves the class file there so the build would work the next time + find build -name messages_${LG}.class -exec rm -f {} \; + RC=1 + break + fi + else + # fast way + # convert to java files in build/messages-proxy-src + TD=build/messages-proxy-src-tmp + TDX=$TD/net/i2p/i2ptunnel/proxy + TD2=build/messages-proxy-src + TDY=$TD2/net/i2p/i2ptunnel/proxy + rm -rf $TD + mkdir -p $TD $TDY + msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i + if [ $? -ne 0 ] + then + echo "ERROR - msgfmt failed on ${i}, not updating translations" + # msgfmt leaves the class file there so the build would work the next time + find build/obj -name messages_${LG}.class -exec rm -f {} \; + RC=1 + break + fi + mv $TDX/messages_$LG.java $TDY + rm -rf $TD fi - mv $TDX/messages_$LG.java $TDY - rm -rf $TD fi done rm -f $TMPFILE diff --git a/apps/i2ptunnel/java/bundle-messages.sh b/apps/i2ptunnel/java/bundle-messages.sh index 00f26b712..ca1885bb0 100755 --- a/apps/i2ptunnel/java/bundle-messages.sh +++ b/apps/i2ptunnel/java/bundle-messages.sh @@ -97,24 +97,41 @@ do # only generate for non-source language echo "Generating ${CLASS}_$LG ResourceBundle..." - # convert to class files in build/obj - TD=build/messages-src-tmp - TDX=$TD/net/i2p/i2ptunnel/web - TD2=build/messages-src - TDY=$TD2/net/i2p/i2ptunnel/web - rm -rf $TD - mkdir -p $TD $TDY - msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i + msgfmt -V | grep -q '0\.19' if [ $? -ne 0 ] then - 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 + # slow way + # convert to class files in jsp/WEB-INF/classes + msgfmt --java --statistics -r $CLASS -l $LG -d ../jsp/WEB-INF/classes $i + if [ $? -ne 0 ] + then + echo "ERROR - msgfmt failed on ${i}, not updating translations" + # msgfmt leaves the class file there so the build would work the next time + find build -name messages_${LG}.class -exec rm -f {} \; + RC=1 + break + fi + else + # fast way + # convert to java files in build/messages-src + TD=build/messages-src-tmp + TDX=$TD/net/i2p/i2ptunnel/web + TD2=build/messages-src + TDY=$TD2/net/i2p/i2ptunnel/web + rm -rf $TD + mkdir -p $TD $TDY + msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i + if [ $? -ne 0 ] + then + 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 + mv $TDX/messages_$LG.java $TDY + rm -rf $TD fi - mv $TDX/messages_$LG.java $TDY - rm -rf $TD fi done rm -f $TMPFILE diff --git a/apps/ministreaming/java/build.xml b/apps/ministreaming/java/build.xml index c3aaf4a55..b03b3f801 100644 --- a/apps/ministreaming/java/build.xml +++ b/apps/ministreaming/java/build.xml @@ -100,6 +100,7 @@ + diff --git a/apps/ministreaming/java/bundle-messages.sh b/apps/ministreaming/java/bundle-messages.sh index 3c9103fd9..101ff2f98 100755 --- a/apps/ministreaming/java/bundle-messages.sh +++ b/apps/ministreaming/java/bundle-messages.sh @@ -96,24 +96,41 @@ do # only generate for non-source language echo "Generating ${CLASS}_$LG ResourceBundle..." - # convert to class files in build/obj - TD=build/messages-src-tmp - TDX=$TD/net/i2p/client/streaming - TD2=build/messages-src - TDY=$TD2/net/i2p/client/streaming - rm -rf $TD - mkdir -p $TD $TDY - msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i + msgfmt -V | grep -q '0\.19' if [ $? -ne 0 ] then - echo "ERROR - msgfmt failed on ${i}, not updating translations" - # msgfmt leaves the class file there so the build would work the next time - find build/obj -name messages_${LG}.class -exec rm -f {} \; - RC=1 - break + # slow way + # convert to class files in build/obj + msgfmt --java --statistics -r $CLASS -l $LG -d build/obj $i + if [ $? -ne 0 ] + then + echo "ERROR - msgfmt failed on ${i}, not updating translations" + # msgfmt leaves the class file there so the build would work the next time + find build -name messages_${LG}.class -exec rm -f {} \; + RC=1 + break + fi + else + # fast way + # convert to java files in build/messages-src + TD=build/messages-src-tmp + TDX=$TD/net/i2p/client/streaming + TD2=build/messages-src + TDY=$TD2/net/i2p/client/streaming + rm -rf $TD + mkdir -p $TD $TDY + msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i + if [ $? -ne 0 ] + then + echo "ERROR - msgfmt failed on ${i}, not updating translations" + # msgfmt leaves the class file there so the build would work the next time + find build/obj -name messages_${LG}.class -exec rm -f {} \; + RC=1 + break + fi + mv $TDX/messages_$LG.java $TDY + rm -rf $TD fi - mv $TDX/messages_$LG.java $TDY - rm -rf $TD fi done rm -f $TMPFILE diff --git a/apps/routerconsole/java/build.xml b/apps/routerconsole/java/build.xml index f2e716608..afd523b4f 100644 --- a/apps/routerconsole/java/build.xml +++ b/apps/routerconsole/java/build.xml @@ -145,6 +145,7 @@ + @@ -199,6 +200,7 @@ + @@ -217,6 +219,7 @@ + diff --git a/apps/routerconsole/java/bundle-messages-countries.sh b/apps/routerconsole/java/bundle-messages-countries.sh index 77045ddad..9e736d101 100755 --- a/apps/routerconsole/java/bundle-messages-countries.sh +++ b/apps/routerconsole/java/bundle-messages-countries.sh @@ -112,24 +112,41 @@ do # only generate for non-source language echo "Generating ${CLASS}_$LG ResourceBundle..." - # convert to class files in build/obj - TD=build/messages-countries-src-tmp - TDX=$TD/net/i2p/router/countries - TD2=build/messages-countries-src - TDY=$TD2/net/i2p/router/countries - rm -rf $TD - mkdir -p $TD $TDY - msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i + msgfmt -V | grep -q '0\.19' if [ $? -ne 0 ] then - echo "ERROR - msgfmt failed on ${i}, not updating translations" - # msgfmt leaves the class file there so the build would work the next time - find build/obj -name messages_${LG}.class -exec rm -f {} \; - RC=1 - break + # slow way + # convert to class files in build/obj + msgfmt --java --statistics -r $CLASS -l $LG -d build/obj $i + if [ $? -ne 0 ] + then + echo "ERROR - msgfmt failed on ${i}, not updating translations" + # msgfmt leaves the class file there so the build would work the next time + find build -name messages_${LG}.class -exec rm -f {} \; + RC=1 + break + fi + else + # fast way + # convert to java files in build/messages-countries-src + TD=build/messages-countries-src-tmp + TDX=$TD/net/i2p/router/countries + TD2=build/messages-countries-src + TDY=$TD2/net/i2p/router/countries + rm -rf $TD + mkdir -p $TD $TDY + msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i + if [ $? -ne 0 ] + then + echo "ERROR - msgfmt failed on ${i}, not updating translations" + # msgfmt leaves the class file there so the build would work the next time + find build/obj -name messages_${LG}.class -exec rm -f {} \; + RC=1 + break + fi + mv $TDX/messages_$LG.java $TDY + rm -rf $TD fi - mv $TDX/messages_$LG.java $TDY - rm -rf $TD fi done rm -f $TMPFILE diff --git a/apps/routerconsole/java/bundle-messages-news.sh b/apps/routerconsole/java/bundle-messages-news.sh index 22137d1f1..0bc13a492 100755 --- a/apps/routerconsole/java/bundle-messages-news.sh +++ b/apps/routerconsole/java/bundle-messages-news.sh @@ -98,24 +98,41 @@ do # only generate for non-source language echo "Generating ${CLASS}_$LG ResourceBundle..." - # convert to class files in build/obj - TD=build/messages-news-src-tmp - TDX=$TD/net/i2p/router/news - TD2=build/messages-news-src - TDY=$TD2/net/i2p/router/news - rm -rf $TD - mkdir -p $TD $TDY - msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i + msgfmt -V | grep -q '0\.19' if [ $? -ne 0 ] then - echo "ERROR - msgfmt failed on ${i}, not updating translations" - # msgfmt leaves the class file there so the build would work the next time - find build/obj -name messages_${LG}.class -exec rm -f {} \; - RC=1 - break + # slow way + # convert to class files in build/obj + msgfmt --java --statistics -r $CLASS -l $LG -d build/obj $i + if [ $? -ne 0 ] + then + echo "ERROR - msgfmt failed on ${i}, not updating translations" + # msgfmt leaves the class file there so the build would work the next time + find build -name messages_${LG}.class -exec rm -f {} \; + RC=1 + break + fi + else + # fast way + # convert to java files in build/messages-news-src + TD=build/messages-news-src-tmp + TDX=$TD/net/i2p/router/news + TD2=build/messages-news-src + TDY=$TD2/net/i2p/router/news + rm -rf $TD + mkdir -p $TD $TDY + msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i + if [ $? -ne 0 ] + then + echo "ERROR - msgfmt failed on ${i}, not updating translations" + # msgfmt leaves the class file there so the build would work the next time + find build/obj -name messages_${LG}.class -exec rm -f {} \; + RC=1 + break + fi + mv $TDX/messages_$LG.java $TDY + rm -rf $TD fi - mv $TDX/messages_$LG.java $TDY - rm -rf $TD fi done rm -f $TMPFILE diff --git a/apps/routerconsole/java/bundle-messages.sh b/apps/routerconsole/java/bundle-messages.sh index 2f2137524..57652909f 100755 --- a/apps/routerconsole/java/bundle-messages.sh +++ b/apps/routerconsole/java/bundle-messages.sh @@ -125,24 +125,41 @@ do # only generate for non-source language echo "Generating ${CLASS}_$LG ResourceBundle..." - # convert to class files in build/obj - TD=build/messages-src-tmp - TDX=$TD/net/i2p/router/web - TD2=build/messages-src - TDY=$TD2/net/i2p/router/web - rm -rf $TD - mkdir -p $TD $TDY - msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i + msgfmt -V | grep -q '0\.19' if [ $? -ne 0 ] then - echo "ERROR - msgfmt failed on ${i}, not updating translations" - # msgfmt leaves the class file there so the build would work the next time - find build/obj -name messages_${LG}.class -exec rm -f {} \; - RC=1 - break + # slow way + # convert to class files in build/obj + msgfmt --java --statistics -r $CLASS -l $LG -d build/obj $i + if [ $? -ne 0 ] + then + echo "ERROR - msgfmt failed on ${i}, not updating translations" + # msgfmt leaves the class file there so the build would work the next time + find build -name messages_${LG}.class -exec rm -f {} \; + RC=1 + break + fi + else + # fast way + # convert to java files in build/messages-src + TD=build/messages-src-tmp + TDX=$TD/net/i2p/router/web + TD2=build/messages-src + TDY=$TD2/net/i2p/router/web + rm -rf $TD + mkdir -p $TD $TDY + msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i + if [ $? -ne 0 ] + then + echo "ERROR - msgfmt failed on ${i}, not updating translations" + # msgfmt leaves the class file there so the build would work the next time + find build/obj -name messages_${LG}.class -exec rm -f {} \; + RC=1 + break + fi + mv $TDX/messages_$LG.java $TDY + rm -rf $TD fi - mv $TDX/messages_$LG.java $TDY - rm -rf $TD fi done rm -f $TMPFILE diff --git a/apps/susidns/src/build.xml b/apps/susidns/src/build.xml index f5279d69b..6d14865f9 100644 --- a/apps/susidns/src/build.xml +++ b/apps/susidns/src/build.xml @@ -136,6 +136,7 @@ + diff --git a/apps/susidns/src/bundle-messages.sh b/apps/susidns/src/bundle-messages.sh index 60aaa17d7..ca08ef214 100755 --- a/apps/susidns/src/bundle-messages.sh +++ b/apps/susidns/src/bundle-messages.sh @@ -98,24 +98,41 @@ do # only generate for non-source language echo "Generating ${CLASS}_$LG ResourceBundle..." - # convert to class files in build/obj - TD=build/messages-src-tmp - TDX=$TD/i2p/susi/dns - TD2=build/messages-src - TDY=$TD2/i2p/susi/dns - rm -rf $TD - mkdir -p $TD $TDY - msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i + msgfmt -V | grep -q '0\.19' if [ $? -ne 0 ] then - echo "ERROR - msgfmt failed on ${i}, not updating translations" - # msgfmt leaves the class file there so the build would work the next time - find WEB-INF/classes -name messages_${LG}.class -exec rm -f {} \; - RC=1 - break + # slow way + # convert to class files in WEB-INF/classes + msgfmt --java --statistics -r $CLASS -l $LG -d WEB-INF/classes $i + if [ $? -ne 0 ] + then + 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 + else + # fast way + # convert to java files in build/messages-src + TD=build/messages-src-tmp + TDX=$TD/i2p/susi/dns + TD2=build/messages-src + TDY=$TD2/i2p/susi/dns + rm -rf $TD + mkdir -p $TD $TDY + msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i + if [ $? -ne 0 ] + then + echo "ERROR - msgfmt failed on ${i}, not updating translations" + # msgfmt leaves the class file there so the build would work the next time + find WEB-INF/classes -name messages_${LG}.class -exec rm -f {} \; + RC=1 + break + fi + mv $TDX/messages_$LG.java $TDY + rm -rf $TD fi - mv $TDX/messages_$LG.java $TDY - rm -rf $TD fi done rm -f $TMPFILE diff --git a/apps/susimail/build.xml b/apps/susimail/build.xml index 2a524b2b6..572fd59b7 100644 --- a/apps/susimail/build.xml +++ b/apps/susimail/build.xml @@ -100,6 +100,7 @@ + diff --git a/apps/susimail/bundle-messages.sh b/apps/susimail/bundle-messages.sh index 330fa7988..f0dc92f86 100644 --- a/apps/susimail/bundle-messages.sh +++ b/apps/susimail/bundle-messages.sh @@ -96,24 +96,41 @@ do # only generate for non-source language echo "Generating ${CLASS}_$LG ResourceBundle..." - # convert to class files in build/obj - TD=build/messages-src-tmp - TDX=$TD/i2p/susi/webmail - TD2=build/messages-src - TDY=$TD2/i2p/susi/webmail - rm -rf $TD - mkdir -p $TD $TDY - msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i + msgfmt -V | grep -q '0\.19' if [ $? -ne 0 ] then - 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 + # slow way + # convert to class files in src/WEB-INF/classes + msgfmt --java --statistics -r $CLASS -l $LG -d src/WEB-INF/classes $i + if [ $? -ne 0 ] + then + 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 + else + # fast way + # convert to java files in build/messages-src + TD=build/messages-src-tmp + TDX=$TD/i2p/susi/webmail + TD2=build/messages-src + TDY=$TD2/i2p/susi/webmail + rm -rf $TD + mkdir -p $TD $TDY + msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i + if [ $? -ne 0 ] + then + 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 + mv $TDX/messages_$LG.java $TDY + rm -rf $TD fi - mv $TDX/messages_$LG.java $TDY - rm -rf $TD fi done rm -f $TMPFILE