summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2005-12-17 14:52:35 +0000
committerTommy Reynolds <Tommy.Reynolds@MegaCoder.com>2005-12-17 14:52:35 +0000
commit47833cbf6837c3be53fc0b21713c054cbd87be44 (patch)
treee50ae14c2781af141e89102d912538d763c53c16 /bin
parentb03caf04dee61dbf7e0f8c6a931a54fe268df24c (diff)
downloadfedora-doc-utils-47833cbf6837c3be53fc0b21713c054cbd87be44.tar.gz
fedora-doc-utils-47833cbf6837c3be53fc0b21713c054cbd87be44.tar.xz
fedora-doc-utils-47833cbf6837c3be53fc0b21713c054cbd87be44.zip
Added "-k" switch to keep on trying to build remaining document languages
in case an earlier translation fails. Also used scalable method to get list of documents to build.
Diffstat (limited to 'bin')
-rw-r--r--bin/bulkbuild20
1 files changed, 14 insertions, 6 deletions
diff --git a/bin/bulkbuild b/bin/bulkbuild
index ec4ec0a..ca485dc 100644
--- a/bin/bulkbuild
+++ b/bin/bulkbuild
@@ -1,6 +1,7 @@
#!/bin/bash
#
# Written by stickster :)
+# Mangled by megacoder ;-P
#
# Pull all active FDP docs from CVS, build and install HTML in
# TARGETDIR folder.
@@ -27,6 +28,7 @@ print_usage() {
echo " -p : build PDF (not working currently)"
echo " -t : build tarball"
echo " -h : print usage (this message)"
+ echo " -k : continue building in face of errors"
}
@@ -44,9 +46,10 @@ set_vars() {
# just to make sure defaults are read
unset FDPDIR HTMLDIR ANONCVS TAG CHUNKS NOCHUNKS PDF TARBALL VERBOSE
+unset KEEPON
BUILDS=0
-while getopts "m:f:D:a:r:Qcnpthv" OPT; do
+while getopts "m:f:D:a:r:Qcnpthvk" OPT; do
case $OPT in
m )
WORKDIR="$OPTARG"
@@ -90,6 +93,9 @@ while getopts "m:f:D:a:r:Qcnpthv" OPT; do
v )
REDIR="/dev/stdout"
;;
+ k )
+ KEEPON="-k"
+ ;;
* )
echo "$MYSELF: invalid option: $OPT"
print_usage
@@ -116,8 +122,10 @@ echo "Checking out docs-common from Fedora Docs CVS"
#cvs -d $ANONCVS login
cvs "$QUIET" -z3 -d $ANONCVS co docs-common
-
-for DOC in `cat docs-common/bin/active`; do
+# for DOC in `cat docs-common/bin/active`; do
+xargs -n1 echo <docs-common/bin/active |
+while read DOC;
+do
DONE=""
echo "Checking out module $DOC from Fedora Docs CVS"
cvs "$QUIET" -z3 -d $ANONCVS co $DOC 2>&1 > $REDIR
@@ -127,7 +135,7 @@ for DOC in `cat docs-common/bin/active`; do
rm -f tmpvars
if [ "$CHUNKS" = "yes" ]; then
echo "Making chunked HTML for ${DOCBASE}"
- make html 2>&1 > $REDIR || ( echo "$MYSELF: CHUNKS failed" ;\
+ make ${KEEPON} html 2>&1 > $REDIR || ( echo "$MYSELF: CHUNKS failed" ;\
exit 251 )
for LANG in $LANGUAGES ; do
DESTDIR="${TARGETDIR}/${DOCBASE}/${LANG}"
@@ -137,8 +145,8 @@ for DOC in `cat docs-common/bin/active`; do
fi
if [ "$NOCHUNKS" = "yes" ]; then
echo "Making nochunks HTML for ${DOCBASE}"
- mak html-nochunks 2>&1 > $REDIR || ( echo "$MYSELF: NOCHUNKS failed" ;\
- exit 251 )
+ make ${KEEPON} html-nochunks 2>&1 > $REDIR ||
+ ( echo "$MYSELF: NOCHUNKS failed" ; exit 251 )
for LANG in $LANGUAGES ; do
DESTDIR="${TARGETDIR}/${DOCBASE}/" # add $LANG if desired
[ ! -d "$DESTDIR" ] && mkdir -p $DESTDIR