Former-commit-id: d8659825a2
This commit is contained in:
Hadi
2024-06-17 19:18:05 +02:00
parent 0332b6c56b
commit bfb370d8fe
14 changed files with 194 additions and 178 deletions

View File

@@ -1,6 +1,14 @@
#!/usr/bin/env bash
# check if file exist: ./docs/src/README_template.md
# copy ./docs/src/README_template.md
# replace {md_table_of_content} by the table of content
# place it in ./README.md
# Create the README.md file from the docs/src/README_template.md file
[[ -d "./docs" ]] || (echo "Folder ./docs not found" && exit 1)
README_FILE="./README.md"
header=$(cat "./docs/src/header.md")
table_of_content=$(~/go/bin/md-table-of-contents ./docs/src/README_template.md)
readme_content=$(cat "./docs/src/README_template.md")
echo "${header//\{date\}/$(date '+%D')}" >"$README_FILE"
echo "${readme_content//\{md_table_of_content\}/$table_of_content}" >>"$README_FILE"