tBetter post.sh. proof: now it works! - monochromatic - monochromatic blog: http://blog.z3bra.org
 (HTM) git clone git://z3bra.org/monochromatic
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) commit 23af2ff1ceb80c450a83ba1f2af4827ac8822c45
 (DIR) parent 925e93447967b86b2f6a9d1154a86221cde75d6f
 (HTM) Author: z3bra <willy@mailoo.org>
       Date:   Wed,  2 Apr 2014 08:40:45 +0200
       
       Better post.sh. proof: now it works!
       
       Diffstat:
         M post.sh                             |      13 ++++++++++++-
       
       1 file changed, 12 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/post.sh b/post.sh
       t@@ -20,7 +20,18 @@ test -d ${folder} || mkdir -p ${folder}
        # build the whole path
        post="${folder}/${file}"
        
       -test -f ${post} || echo "cannot create ${post}" && exit 1
       +# create the file
       +cat <<EOF > ${post}
       +### [${title}](#)
       +## &mdash; ${date}
       +
       +<!-- vim: set ft=markdown ts=4 et: -->
       +EOF
       +
       +if ! test -f ${post}; then
       +    echo "cannot create ${post}"
       +    exit 1
       +fi
        
        echo "$post created"