diff options
author | Luke S. <luke@motimail.com> | 2009-05-12 11:20:22 +0000 |
---|---|---|
committer | Luke S. <luke@motimail.com> | 2009-05-12 11:20:22 +0000 |
commit | 3e0e079ec9a31692142cf6f03cd9f64c8e454ca0 (patch) | |
tree | e52adc5436ea6ceca71e1b48ba74f9bb1e477851 /modules/calvinscommentaries | |
parent | a1b003032378280664147d60091e052f38a80a91 (diff) | |
download | sword-tools-3e0e079ec9a31692142cf6f03cd9f64c8e454ca0.tar.gz |
Replaced 'replace' utility with perl
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@202 07627401-56e2-0310-80f4-f8cd0041bdcd
Diffstat (limited to 'modules/calvinscommentaries')
-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 |