Skip to content
This repository has been archived by the owner on Jan 11, 2020. It is now read-only.

Commit

Permalink
Merge pull request #37 from peastone/patch-1
Browse files Browse the repository at this point in the history
Update data2header.sh (no functional change)
  • Loading branch information
merlinschumacher authored Feb 26, 2018
2 parents 16f2583 + ad256e8 commit 0979ef1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions data2header.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ cd $TMPDIR
yuicompressor -o '.css$:.css' *.css
yuicompressor -o '.js$:.js' *.js

sed -i.bak ':a;N;$!ba;s/>\s*</></g' *.htm
rm *.bak
# :a;N;$!ba; will move all lines into the pattern space (internal buffer of sed)
# so that the next command will also remove the line breaks (which are also whitespaces)
# s/>\s*</></g' will remove all whitespaces between the HTML tags
# example:
#">
# <" becomes "><"
sed -i ':a;N;$!ba;s/>\s*</></g' *.htm
gzip *
cat > $OUTFILE <<DELIMITER
/*
Expand Down

0 comments on commit 0979ef1

Please sign in to comment.