summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rwxr-xr-xbuild/build.sh15
-rwxr-xr-xbuild/buildweb.sh11
-rw-r--r--build/po_functions18
3 files changed, 25 insertions, 19 deletions
diff --git a/build/build.sh b/build/build.sh
index dedd44df0..01e47e3a7 100755
--- a/build/build.sh
+++ b/build/build.sh
@@ -10,12 +10,12 @@ manual_release=${manual_release:=etch}
if [ -z "$languages" ]; then
# Buildlist of languages
# Note: this list is no longer being maintained; see debian/langlist instead
- languages="en de es fr ja"
+ languages="en de fr ja pt"
fi
if [ -z "$architectures" ]; then
# Note: this list is no longer being maintained; see debian/archlist instead
- architectures="alpha arm hppa i386 ia64 m68k mips mipsel powerpc s390 sparc"
+ architectures="alpha amd64 arm hppa i386 ia64 m68k mips mipsel powerpc s390 sparc"
fi
if [ -z "$destination" ]; then
@@ -34,6 +34,9 @@ if [ "$official_build" ]; then
export official_build
fi
+# Delete any old generated XML files
+clear_xml
+
# We need to merge the XML files for English and update the POT files
export PO_USEBUILD="1"
update_templates
@@ -42,8 +45,7 @@ for lang in $languages; do
echo "Language: $lang";
# Update PO files and create XML files
- check_po
- if [ -n "$USES_PO" ] ; then
+ if [ ! -d ../$lang ] && uses_po; then
generate_xml
fi
@@ -67,9 +69,6 @@ for lang in $languages; do
./clear.sh
done
-
- # Delete generated XML files
- [ -n "$USES_PO" ] && rm -r ../$lang || true
done
PRESEED="../en/appendix/preseed.xml"
@@ -77,4 +76,6 @@ if [ -f $PRESEED ] && [ -f preseed.pl ] ; then
./preseed.pl -r $manual_release $PRESEED >$destination/example-preseed.txt
fi
+# Delete temporary PO files and generated XML files
clear_po
+clear_xml
diff --git a/build/buildweb.sh b/build/buildweb.sh
index 7f5ddcf36..6d3f52c21 100755
--- a/build/buildweb.sh
+++ b/build/buildweb.sh
@@ -32,6 +32,9 @@ export official_build="1"
export web_build="1"
export manual_target="for_wdo"
+# Delete any old generated XML files
+clear_xml
+
# We need to merge the XML files for English and update the POT files
export PO_USEBUILD="1"
update_templates
@@ -40,8 +43,7 @@ for lang in $languages; do
echo "Language: $lang";
# Update PO files and create XML files
- check_po
- if [ -n "$USES_PO" ] ; then
+ if [ ! -d ../$lang ] && uses_po; then
generate_xml
fi
@@ -65,9 +67,6 @@ for lang in $languages; do
./clear.sh
done
-
- # Delete generated XML files
- [ -n "$USES_PO" ] && rm -r ../$lang || true
done
PRESEED="../en/appendix/preseed.xml"
@@ -75,4 +74,6 @@ if [ -f $PRESEED ] && [ -f preseed.pl ] ; then
./preseed.pl -r $manual_release $PRESEED >$destination/example-preseed.txt
fi
+# Delete temporary PO files and generated XML files
clear_po
+clear_xml
diff --git a/build/po_functions b/build/po_functions
index 8079ddb7b..561210105 100644
--- a/build/po_functions
+++ b/build/po_functions
@@ -9,19 +9,15 @@ update_templates () {
}
# Check whether language uses PO files for translation
-check_po () {
- USES_PO=""
+uses_po () {
if [ -d "../po/$lang" ] ; then
if [ -d "../$lang/.svn" ] ; then
echo "Warning: both PO files and XML files are present; ignoring PO files"
else
- USES_PO="1"
- if [ -d "../$lang/" ] ; then
- echo "Info: cleaning old XML files"
- rm -r ../$lang/
- fi
+ return 0
fi
fi
+ return 1
}
generate_xml () {
@@ -35,6 +31,14 @@ generate_xml () {
return 0
}
+clear_xml () {
+ for lang in $languages; do
+ if [ -d ../po/$lang ] && [ ! -d ../$lang/.svn ]; then
+ rm -rf ../$lang
+ fi
+ done
+}
+
clear_po () {
rm -rf ./build.po
}