Execute commands one by one to be compatible with OS X's version of sed

Refs. #39
This commit is contained in:
Sander van Leeuwen 2015-03-26 00:30:11 +01:00
parent 5ddd7e7b28
commit da228542bc

View File

@ -1,16 +1,15 @@
#!/bin/sh
sed -i -e 's/> </></g' \
-e 's/ / /g' \
-e 's/\s+$//g' \
-e 's/ width="17" height="17" border="0"//g' \
-e 's/<td [^>]+listhdrr[^>]+>/<th>/g' \
-e 's/<body[^>]*>//g' \
-e 's/<\(table\|td\|span\|div\)[^>]\+>/<\1>/g' \
-e 's/<?php include("fbegin.inc"); ?>//g' \
-e 's/<?php include("fend.inc"); ?>/<?php include("foot.inc"); ?>/g' \
-e 's/<?php echo /<?=/g' \
-e 's/;\s*?>/?>/g' \
-e 's/<?\s*=\s*/<?=/g' \
-e 's/ <> / != /g' \
$1
sed -i -e 's/> </></g' $1 ;
sed -i -e 's/ / /g' $1 ;
sed -i -e 's/\s+$//g' $1 ;
sed -i -e 's/ width="17" height="17" border="0"//g' $1 ;
sed -i -e 's/<td [^>]+listhdrr[^>]+>/<th>/g' $1 ;
sed -i -e 's/<body[^>]*>//g' $1 ;
sed -i -e 's/<\(table\|td\|span\|div\)[^>]\+>/<\1>/g' $1 ;
sed -i -e 's/<?php include("fbegin.inc"); ?>//g' $1 ;
sed -i -e 's/<?php include("fend.inc"); ?>/<?php include("foot.inc"); ?>/g' $1 ;
sed -i -e 's/<?php echo /<?=/g' $1 ;
sed -i -e 's/;\s*?>/?>/g' $1 ;
sed -i -e 's/<?\s*=\s*/<?=/g' $1 ;
sed -i -e 's/ <> / != /g' $1 ;