diff options
Diffstat (limited to 'modules/calvinscommentaries/bundle_and_install.sh')
-rwxr-xr-x | modules/calvinscommentaries/bundle_and_install.sh | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/modules/calvinscommentaries/bundle_and_install.sh b/modules/calvinscommentaries/bundle_and_install.sh index 57cbf5b..9ec47b3 100755 --- a/modules/calvinscommentaries/bundle_and_install.sh +++ b/modules/calvinscommentaries/bundle_and_install.sh @@ -12,11 +12,18 @@ OSIS2MODOUTPUT="$BUILDDIR/modules/comments/zcom/calvinscommentaries" 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 @@ function reversify { 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 reversify { 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 @@ function do_zip { 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_zip { 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 |