diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 004c32b34d..ad1c0ea9ed 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -28,15 +28,18 @@ docs_readme() yml="scripts/IronOS-mkdocs.yml" md="Documentation/README.md" # ^^^^ hardcoded paths relative to IronOS/ to make this func very trivial - echo > "${md}" - echo "" >> "${md}" - echo "" >> "${md}" - echo >> "${md}" - echo "#### This is autogenerated README for brief navigation through github over official documentation for IronOS project" >> "${md}" - echo "#### This documentation is also available [here online](https://ralim.github.io/IronOS)" >> "${md}" - echo >> "${md}" +# file overwritten section looks out of style but hoping to make shellcheck happy +cat << EOF > "${md}" + + + + +#### This is autogenerated README for brief navigation through github over official documentation for IronOS project +#### This documentation is also available [here online](https://ralim.github.io/IronOS) + +EOF # it probably will become unexplainable in a few months but so far it works: - cat "${yml}" | sed '1,/^nav/d; /^ *$/,$d; s,- ,- [,; s,: ,](../Documentation/,; s,.md,.md),; s,:$,],; s,/Pinecil ,/Pinecil%20,; /^ - \[.*\]$/ s,\[,,; s,]$,,' >> "${md}" + sed '1,/^nav/d; /^ *$/,$d; s,- ,- [,; s,: ,](../Documentation/,; s,.md,.md),; s,:$,],; s,/Pinecil ,/Pinecil%20,; /^ - \[.*\]$/ s,\[,,; s,]$,,' "${yml}" >> "${md}" echo "" echo "${yml} is updated. Do not forget to commit & push changes:" echo "" @@ -76,7 +79,7 @@ cmd="${1}" # if only README.md for Documentation update is required then run it & exit if [ "docs_readme" = "${cmd}" ]; then - ${cmd} + docs_readme exit "${?}" fi;