diff options
-rwxr-xr-x | modules/calvinscommentaries/bundle_and_install.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/calvinscommentaries/bundle_and_install.sh b/modules/calvinscommentaries/bundle_and_install.sh index dd14549..f7821b1 100755 --- a/modules/calvinscommentaries/bundle_and_install.sh +++ b/modules/calvinscommentaries/bundle_and_install.sh @@ -21,7 +21,7 @@ COMBINED="calvincommentaries.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;} + which perl > /dev/null || { echo "Cannot find required tool 'perl'. 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;} } @@ -71,7 +71,7 @@ function reversify { # $LASTFILE is special -- it will have trailing stuff TMP=`mktemp` - replace '</osis>' '' '</osisText>' '' < $LASTFILE > $TMP || exit 1 + perl -pne 's|</osis>||g; s|</osisText>||g' < $LASTFILE > $TMP || exit 1 mv $TMP $LASTFILE @@ -93,7 +93,7 @@ function reversify { # Now strip stuff we added TMP2=`mktemp` - cat "$F.versified" | egrep -v 'xml version' | replace '<osis>' '' '<osisText>' '' '</osis>' '' '</osisText>' '' > $TMP2 + cat "$F.versified" | egrep -v 'xml version' | perl -pne 's|<osis>||g; s|<osisText>||g; s|</osis>||g; s|</osisText>||g;' > $TMP2 mv $TMP2 "$F.versified" done |