tnow includes the blank div - monochromatic - monochromatic blog: http://blog.z3bra.org
(HTM) git clone git://z3bra.org/monochromatic
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) commit 75be994b4e289f7d6c2166456ef37e128aae7221
(DIR) parent b702d9d84592501e50dabe1a77cbc9343780449e
(HTM) Author: Willy Goiffon <w.goiffon@gmail.com>
Date: Thu, 8 Aug 2013 19:06:30 +0200
now includes the blank div
Diffstat:
M update.sh | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/update.sh b/update.sh
t@@ -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