[Libreoffice-commits] core.git: solenv/bin

Thorsten Behrens Thorsten.Behrens at CIB.de
Sat May 20 03:04:10 UTC 2017


 solenv/bin/mkdocs.sh |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

New commits:
commit b71ad82b0e4b34ef3513f6115fe257c883700a0b
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Date:   Sat May 20 05:03:08 2017 +0200

    mkdocs.sh: support more than one markdown converter binary
    
    Change-Id: Ib3f79dd53e96c8f6d40c9c6614db5c672f24ba97

diff --git a/solenv/bin/mkdocs.sh b/solenv/bin/mkdocs.sh
index cd2a33f6d485..1be57f9cc8f5 100755
--- a/solenv/bin/mkdocs.sh
+++ b/solenv/bin/mkdocs.sh
@@ -90,13 +90,17 @@ function proc_text_markdown {
 }
 
 function check_cmd {
-  cmd_needed="$1"
+  cmds_needed="$1"
   error_msg="$2"
 
-  which $cmd_needed > /dev/null 2>&1 || {
-    echo "$error_msg" >&2
-    exit 1
-  }
+  found=0
+  for cmd_needed in $cmds_needed; do
+    which $cmd_needed > /dev/null 2>&1 && found=1
+  done
+  if [ $found = 0 ]; then
+      echo "$error_msg" >&2
+      exit 1
+  fi
 }
 
 function setup {
@@ -115,7 +119,7 @@ function setup {
 # binaries that we need
 check_cmd doxygen "You need doxygen for doc generation"
 check_cmd dot "You need the graphviz tools to create the nice inheritance graphs"
-check_cmd markdown "You need markdown in order to convert README.md into html"
+check_cmd "markdown markdown2" "You need either markdown or markdown2 in order to convert README.md into html"
 
 # suck setup
 setup "SOLARINC"


More information about the Libreoffice-commits mailing list