[sword-svn] r202 - trunk/modules/calvinscommentaries

lukeplant at crosswire.org lukeplant at crosswire.org
Tue May 12 04:20:22 MST 2009


Author: lukeplant
Date: 2009-05-12 04:20:22 -0700 (Tue, 12 May 2009)
New Revision: 202

Modified:
   trunk/modules/calvinscommentaries/bundle_and_install.sh
Log:
Replaced 'replace' utility with perl



Modified: trunk/modules/calvinscommentaries/bundle_and_install.sh
===================================================================
--- trunk/modules/calvinscommentaries/bundle_and_install.sh	2009-05-12 11:19:51 UTC (rev 201)
+++ trunk/modules/calvinscommentaries/bundle_and_install.sh	2009-05-12 11:20:22 UTC (rev 202)
@@ -21,7 +21,7 @@
 
 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 @@
 
 	# $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 @@
 
 	    # 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




More information about the sword-cvs mailing list