From: Jérémie Astor Date: Thu, 16 Jan 2020 19:52:42 +0000 (+0100) Subject: ensure mddir exists X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=c52bd7b9c7d599e38db9670045d98a871a7d97a5;p=gwion.git ensure mddir exists --- diff --git a/scripts/mdr2mdbook.sh b/scripts/mdr2mdbook.sh index a537d6d1..52da77e1 100644 --- a/scripts/mdr2mdbook.sh +++ b/scripts/mdr2mdbook.sh @@ -1,3 +1,4 @@ +#!/bin/sh footer() { cat << EOF @@ -37,10 +38,11 @@ runall() { done } - if [[ "$1" == *".mdr" ]] - then doc2src $1 - if [ "$(git status -s | grep docs)" ] - then sh scripts/summary.sh > md/SUMMARY.md - fi - else runall - fi +ensure_dir "$(dirname $1)" +if [[ "$1" == *".mdr" ]] +then doc2src $1 +if [ "$(git status -s | grep docs)" ] +then sh scripts/summary.sh > md/SUMMARY.md +fi +else runall +fi