Kaydet (Commit) b71ad82b authored tarafından Thorsten Behrens's avatar Thorsten Behrens

mkdocs.sh: support more than one markdown converter binary

Change-Id: Ib3f79dd53e96c8f6d40c9c6614db5c672f24ba97
üst 0215e8f9
...@@ -90,13 +90,17 @@ function proc_text_markdown { ...@@ -90,13 +90,17 @@ function proc_text_markdown {
} }
function check_cmd { function check_cmd {
cmd_needed="$1" cmds_needed="$1"
error_msg="$2" error_msg="$2"
which $cmd_needed > /dev/null 2>&1 || { found=0
echo "$error_msg" >&2 for cmd_needed in $cmds_needed; do
exit 1 which $cmd_needed > /dev/null 2>&1 && found=1
} done
if [ $found = 0 ]; then
echo "$error_msg" >&2
exit 1
fi
} }
function setup { function setup {
...@@ -115,7 +119,7 @@ function setup { ...@@ -115,7 +119,7 @@ function setup {
# binaries that we need # binaries that we need
check_cmd doxygen "You need doxygen for doc generation" 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 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 # suck setup
setup "SOLARINC" setup "SOLARINC"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment