mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-02 11:12:09 +02:00
update
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user