fakestache-ssg

[Archived] A static site generator in Bash 4.
Log | Files | Refs | Submodules | README

commit 699373d2d1e2419b21cbedeaf49399f624ee5049
parent 6b04693ef821bbbe7a88a5d82e12832ffd8b6e4b
Author: Hugo Soucy <hugo.soucy@savoirfairelinux.com>
Date:   Fri, 10 Mar 2017 20:06:11 -0500

Move a comment and check if the tmp folder exist before delete it

Diffstat:
Mfunctions/create-html-pages | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/functions/create-html-pages b/functions/create-html-pages @@ -10,18 +10,18 @@ create_html_pages () { pandoc --template="$TPL_PANDOC_PATH/index.html" \ -o "$CONTENT_PATH/index.html" "$CONTENT_PATH/index.md" + # Then create others case "$1" in true) find_noindex_markdown=$(find "$CONTENT_PATH/" -mindepth 2 -type f \( -name "*.md" ! -name "index.md" \)) rm -R "$PUBLICHTML_PATH/"* - rm -R "$TMP_PATH/"* + [ -d "$TMP_PATH/" ] && rm -R "$TMP_PATH/"* ;; false) find_noindex_markdown=$(find "$CONTENT_PATH/" -mindepth 2 -type f \( -name "*.md" ! -name "index.md" \) -mtime -100) ;; esac - # Then create others for markdown in $find_noindex_markdown; do # Markdown files names without path outputname=$(basename "$markdown")