[sword-svn] r134 - trunk/modules/calvinscommentaries
lukeplant at www.crosswire.org
lukeplant at www.crosswire.org
Sun Jan 13 08:32:34 MST 2008
Author: lukeplant
Date: 2008-01-13 08:32:32 -0700 (Sun, 13 Jan 2008)
New Revision: 134
Modified:
trunk/modules/calvinscommentaries/bundle_and_install.sh
Log:
Fixed build script so that each stage is modular as far as possible
Modified: trunk/modules/calvinscommentaries/bundle_and_install.sh
===================================================================
--- trunk/modules/calvinscommentaries/bundle_and_install.sh 2008-01-09 02:10:10 UTC (rev 133)
+++ trunk/modules/calvinscommentaries/bundle_and_install.sh 2008-01-13 15:32:32 UTC (rev 134)
@@ -12,11 +12,18 @@
CONFDIR="$BUILDDIR/mods.d"
THISDIR=`pwd`
+
+##################
+COMBINED="calvinscommentaries.versified.osis"
+
+
##############################################
function check_requirements {
which csplit > /dev/null || { echo "Cannot find required tool 'csplit'. Exiting."; exit 1;}
which replace > /dev/null || { echo "Cannot find required tool 'replace'. Exiting."; exit 1;}
+ [ -d "$CALCOMSOURCES" ] || { echo "CALCOMSOURCES not set correctly -- please edit this file."; exit 1;}
+ [ -d "$SWORDTOOLS" ] || { echo "SWORDTOOLS not set correctly -- please edit this file."; exit 1;}
}
function setup_dirs {
@@ -92,7 +99,6 @@
done
# Now combine again
- COMBINED="calvinscommentaries.versified.osis"
# Use this cleared up XML instead of the uncleaned stuff in $FIRSTFILEALT
echo '<?xml version="1.0" encoding="UTF-8"?>' > $COMBINED
echo '<osis xmlns="http://www.bibletechnologies.net/2003/OSIS/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bibletechnologies.net/2003/OSIS/namespace http://www.bibletechnologies.net/osisCore.2.1.1.xsd">' >> $COMBINED
@@ -110,12 +116,12 @@
function convert_to_mod {
- #######################################################################
+ cd "$BUILDDIR"
# clean out old stuff
- rm "$OSIS2MODOUTPUT/*"
+ rm -f "$OSIS2MODOUTPUT/*"
- # Bug in osis2mod currently -- it removes all whitespace either side
+ # Bug in osis2mod 1.5.9 -- it removes all whitespace either side
# of a newline, so if a sentence has a newline in it, words end
# up merged together. Fix that below:
@@ -132,9 +138,7 @@
echo "Zipping..."
cp "$THISDIR/calvinscommentaries.conf" "$CONFDIR"
-
cd "$BUILDDIR"
-
rm -f CalvinsCommentaries.zip
zip -r CalvinsCommentaries.zip mods.d/ modules/
}
@@ -142,10 +146,14 @@
function do_install {
echo "Installing..."
+ cd "$BUILDDIR"
unzip -o -d $HOME/.sword CalvinsCommentaries.zip
}
+# The temporary files from each stage are left behind, so you
+# just comment out the earlier stages if you only want
+# to rerun the later stages.
check_requirements
setup_dirs
combine
More information about the sword-cvs
mailing list