hugosoucycc

[ARCHIVED] Another old source code of <hugo.soucy.cc>.
Log | Files | Refs | Submodules

commit 3f8ee935fd56158617ff142e683c396a46377058
parent 16b7fcc4b3206018e131bc15bd20566177094bd2
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Sun, 31 Jul 2016 14:27:27 -0400

Check if Pandoc is installed

Diffstat:
Mpanstash.sh | 25+++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/panstash.sh b/panstash.sh @@ -22,13 +22,22 @@ . functions/get-static-files.sh . functions/clean-content-folder.sh -# Execute main functions -build_pandoc_templates -create_html_pages -create_html_sections -get_static_files -clean_content_folder +# Check if Pandoc is installed. +if hash pandoc 2>/dev/null; then + # Ok Pandoc is here. + # Execute main functions + build_pandoc_templates + create_html_pages + create_html_sections + get_static_files + clean_content_folder -echo "Your New Website Is Ready Here : $PUBLICHTML_PATH/ . Thanks Pandoc!!" + echo "Your New Website Is Ready Here : $PUBLICHTML_PATH/ . Thanks Pandoc!!" -exit 0 + exit 0 +else + echo "You must install *Pandoc* for using *Panstash*." + echo "Please visit <http://pandoc.org/installing.html>." + + exit 1 +fi