monochromatic

monochromatic blog: http://blog.z3bra.org
git clone git://z3bra.org/monochromatic
Log | Files | Refs

commit 75be994b4e289f7d6c2166456ef37e128aae7221
parent b702d9d84592501e50dabe1a77cbc9343780449e
Author: Willy Goiffon <w.goiffon@gmail.com>
Date:   Thu,  8 Aug 2013 19:06:30 +0200

now includes the blank div

Diffstat:
update.sh | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/update.sh b/update.sh @@ -1,8 +1,11 @@ #!/bin/bash for file in $(find . -name '*.html'); do - if test $(grep -E '</header>&<footer>' $file); then - sed '1,/<\/header>/d;/<footer>/,$d' $file - cat head.template $file foot.template > buffer.html + if [[ -n "$(cat $file|tr -d '\n' |grep -E '</header>.*<footer')" ]]; then + cat head.template > buffer.html + sed '1,/<\/header>/d;/<div id=.blank.>/,$d' $file >> buffer.html + cat foot.template >> buffer.html + + mv buffer.html $file fi done