Martin Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48963 )
Change subject: util/util_readme: Update summary and tail to match current docs ......................................................................
util/util_readme: Update summary and tail to match current docs
The top and bottom of the generated file have been changed in the documentation directory, so update what's generated by creating markdown files in the util_readme directory.
This change also adds a note at the bottom of the documentation file that it's generated and the markdown in the util_readme directory should be edited instead.
Signed-off-by: Martin Roth martin@coreboot.org Change-Id: I020a94e66ada320e49bd78125d59a09b237015f5 --- A util/util_readme/bottom_text.md A util/util_readme/header_text.md M util/util_readme/util_readme.sh 3 files changed, 24 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/48963/1
diff --git a/util/util_readme/bottom_text.md b/util/util_readme/bottom_text.md new file mode 100644 index 0000000..4a7dc68 --- /dev/null +++ b/util/util_readme/bottom_text.md @@ -0,0 +1,16 @@ + + + ## In depth documentation + +* [ifdtool](ifdtool/index.md) + +## Generated documentation + +**Please do not edit the markdown file in the documentation directory +*directly.** + +This file was generated by running util_readme.sh. Please make sure it +is rerun when new tools are added or when documentation is updated. + +To update, edit the markdown files in the util directory, then +re-generate this file by running `util/util_readme/util_readme.sh` diff --git a/util/util_readme/header_text.md b/util/util_readme/header_text.md new file mode 100644 index 0000000..47769c7 --- /dev/null +++ b/util/util_readme/header_text.md @@ -0,0 +1,5 @@ +# Utilities + +## List of utils + +_Scripts and programs found in the coreboot `./util` directory_ diff --git a/util/util_readme/util_readme.sh b/util/util_readme/util_readme.sh index 64b4232..168bde0 100755 --- a/util/util_readme/util_readme.sh +++ b/util/util_readme/util_readme.sh @@ -10,7 +10,6 @@ UTIL_DIR=$(dirname "$UTIL_README_DIR") COREBOOT_ROOT_DIR=$(dirname "$UTIL_DIR") DOCMENTATION_DIR="$COREBOOT_ROOT_DIR/Documentation" -SUMMARY="_Scripts and programs found in the `./util` directory_"
# format description to under 72 characters per line and only # breaking on whitespace @@ -27,8 +26,7 @@ DESCRIPTION_FILES=$(find "$UTIL_DIR" -name "description.md" | sort)
echo -n "" > "$UTIL_DIR/README.md" -echo "# Utilities" > "$DOCMENTATION_DIR/util.md" -echo "$SUMMARY" >> "$DOCMENTATION_DIR/util.md" +cat "${UTIL_README_DIR}/header_text.md" > "$DOCMENTATION_DIR/util.md"
for DESC_FILE in $DESCRIPTION_FILES; do UTIL_NAME=$(echo "$DESC_FILE" | rev | cut -d '/' -f2 | rev) @@ -43,3 +41,5 @@ fmtstring "$DESC" >> "$UTIL_DIR/README.md" fmtstring "$DESC" >> "$DOCMENTATION_DIR/util.md" done + +cat "${UTIL_README_DIR}/bottom_text.md" >> "$DOCMENTATION_DIR/util.md"