tmoved helpers to a subdirectory - monochromatic - monochromatic blog: http://blog.z3bra.org
 (HTM) git clone git://z3bra.org/monochromatic
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) commit fe49eb5a2192ee643bbe4aaf6ab6bf874b8ee3ac
 (DIR) parent b189c7fb3c446b1504ff4ba53b0f010dddb88f1a
 (HTM) Author: Willy Goiffon <w.goiffon@gmail.com>
       Date:   Sat, 10 Aug 2013 13:08:12 +0200
       
       moved helpers to a subdirectory
       
       Diffstat:
         D post.sh                             |       5 -----
         R body.template -> tools/body.templa… |       0 
         R check.sh -> tools/check.sh          |       0 
         R foot.template -> tools/foot.templa… |       0 
         R head.template -> tools/head.templa… |       0 
         A tools/post.sh                       |      11 +++++++++++
         A tools/update.sh                     |      11 +++++++++++
         D update.sh                           |      11 -----------
       
       8 files changed, 22 insertions(+), 16 deletions(-)
       ---
 (DIR) diff --git a/post.sh b/post.sh
       t@@ -1,5 +0,0 @@
       -#!/bin/bash
       -
       -[[ -z "$1" ]] && exit 1
       -
       -cat head.template body.template foot.template >> $(date +%Y)/$(date +%m)/${1// /-}.html
 (DIR) diff --git a/body.template b/tools/body.template
 (DIR) diff --git a/check.sh b/tools/check.sh
 (DIR) diff --git a/foot.template b/tools/foot.template
 (DIR) diff --git a/head.template b/tools/head.template
 (DIR) diff --git a/tools/post.sh b/tools/post.sh
       t@@ -0,0 +1,11 @@
       +#!/bin/bash
       +
       +[[ -z "$1" ]] && exit 1
       +
       +POST="$(date +%Y)/$(date +%m)/${1// /-}.html"
       +
       +cat tools/{head,body,foot}.template >>  $POST
       +
       +echo "$POST created"
       +
       +
 (DIR) diff --git a/tools/update.sh b/tools/update.sh
       t@@ -0,0 +1,11 @@
       +#!/bin/bash
       +
       +for file in $(find . -name '*.html'); do
       +    if [[ -n "$(cat $file|tr -d '\n' |grep -E '</header>.*<footer>')" ]]; then
       +        cat tools/head.template > buffer.html
       +        sed '1,/<\/header>/d;/<!-- footer/,$d' $file >> buffer.html
       +        cat tools/foot.template >> buffer.html
       +
       +        mv buffer.html $file
       +    fi
       +done
 (DIR) diff --git a/update.sh b/update.sh
       t@@ -1,11 +0,0 @@
       -#!/bin/bash
       -
       -for file in $(find . -name '*.html'); do
       -    if [[ -n "$(cat $file|tr -d '\n' |grep -E '</header>.*<footer>')" ]]; then
       -        cat head.template > buffer.html
       -        sed '1,/<\/header>/d;/<!-- footer/,$d' $file >> buffer.html
       -        cat foot.template >> buffer.html
       -
       -        mv buffer.html $file
       -    fi
       -done