solenv: fix markdown issues in mkdocs.sh
- Fedora 28 has python3-markdown2 package containing /usr/bin/markdown2-3 - the "alias" doesn't work at all because it's not exported to the sub-shell in $(markdown) so use variable instead Change-Id: Icf2af1e66750269e0660f3897a91734cadf5d978
This commit is contained in:
@@ -101,7 +101,7 @@ function check_cmd {
|
||||
echo "$error_msg" >&2
|
||||
exit 1
|
||||
fi
|
||||
alias "${cmds_needed%% *}"=$cmd
|
||||
export "${cmds_needed%% *}"=$cmd
|
||||
}
|
||||
|
||||
function setup {
|
||||
@@ -120,7 +120,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 markdown2" "You need either markdown or markdown2 in order to convert README.md into html"
|
||||
check_cmd "markdown markdown2 markdown2-3" "You need either markdown or markdown2 in order to convert README.md into html"
|
||||
|
||||
# suck setup
|
||||
setup "SOLARINC"
|
||||
@@ -253,7 +253,7 @@ for module_name in *; do
|
||||
|
||||
if [ ${cur_file: -3} == ".md" ]; then
|
||||
# This is a markdown file.
|
||||
text="$(markdown $cur_file | proc_text_markdown)"
|
||||
text="$(${markdown} $cur_file | proc_text_markdown)"
|
||||
echo $text >> "$BASE_OUTPUT/${module_name}.html"
|
||||
else
|
||||
proc_text < $cur_file >> "$BASE_OUTPUT/${module_name}.html"
|
||||
|
||||
Reference in New Issue
Block a user