Martin Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48964 )
Change subject: util/util_readme - Handle links in util description.md files ......................................................................
util/util_readme - Handle links in util description.md files
The Documentation/util.md file had been edited to add some links to additional supporting documentation. This change allows those links to be added directly to the description.md file. Some code has been added so that the links are stripped from the util/README.md file.
Signed-off-by: Martin Roth martin@coreboot.org Change-Id: Ie06f9ceab10a3993f592256e53cdf70570ade778 --- M util/util_readme/util_readme.sh 1 file changed, 11 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/64/48964/1
diff --git a/util/util_readme/util_readme.sh b/util/util_readme/util_readme.sh index 168bde0..63f6cfb 100755 --- a/util/util_readme/util_readme.sh +++ b/util/util_readme/util_readme.sh @@ -32,13 +32,22 @@ UTIL_NAME=$(echo "$DESC_FILE" | rev | cut -d '/' -f2 | rev) DESC=$(cat "$DESC_FILE")
- if [[ $DESC == "__"${UTIL_NAME}* || $DESC == "__["${UTIL_NAME}* ]]; then + if [[ $DESC =~ [__${UTIL_NAME} ]]; then + PLAINDESC="* ${DESC//[__${UTIL_NAME}__](*)/__${UTIL_NAME}__}" DESC="* $DESC" + elif [[ $DESC == "__"${UTIL_NAME}* || $DESC == "__["${UTIL_NAME}* ]]; then + DESC="* $DESC" + PLAINDESC="$DESC" else DESC="* __${UTIL_NAME}__ - $DESC" + PLAINDESC="$DESC" fi
- fmtstring "$DESC" >> "$UTIL_DIR/README.md" + if [[ $DESC =~ [_${UTIL_NAME} ]]; then + PLAINDESC="${PLAINDESC//[_${UTIL_NAME}_](*)/_${UTIL_NAME}_}" + fi + + fmtstring "$PLAINDESC" >> "$UTIL_DIR/README.md" fmtstring "$DESC" >> "$DOCMENTATION_DIR/util.md" done
Tom Hiller has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48964 )
Change subject: util/util_readme - Handle links in util description.md files ......................................................................
Patch Set 1:
Why remove links in README.md?
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48964 )
Change subject: util/util_readme - Handle links in util description.md files ......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
Patch Set 1:
Why remove links in README.md?
Because the links tend to be specific to the documentation directory and wouldn't work correctly from the util directory.
[_cbfstool_](cbfstool/index.md) [__ifdtool__](ifdtool/index.md)
If we want to update them to make them do something else, I'm good with that
Martin Roth has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/48964 )
Change subject: util/util_readme - Handle links in util description.md files ......................................................................
Abandoned