From 0d90b0f45a882c31971af80d31a83e5ddae075ec Mon Sep 17 00:00:00 2001 From: rwxrob Date: Tue, 10 Aug 2021 19:15:33 -0400 Subject: [PATCH] Add autogenerated footer and remove command hr --- README.md | 7 +++++-- command | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9a91d38..93c87a5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Bash Template Command -*This `README.md` is [autogenerated](#generate-readmemd-file).* +*This `README.md` is autogenerated.* This is a GitHub template repo that will be copied instead of forked to create a new Bash command with a command something like this: @@ -60,7 +60,6 @@ Copyright 2021 Rob Muhlestein Released under Apache-2.0 License Please mention ----- ## Commands @@ -102,3 +101,7 @@ GitHub or similar hosting service. Displays a summary of usage. +---- + +*Autogenerated Tue Aug 10 07:15:16 PM EDT 2021* + diff --git a/command b/command index 14edf1a..9e12bcc 100755 --- a/command +++ b/command @@ -171,7 +171,7 @@ GitHub or similar hosting service. ' command_readme() { _trim "${help[main]}" local usage="$(command_usage)" - printf "\n----\n\n## Commands\n\n" + printf "\n\n## Commands\n\n" local -a names=("${!help[@]}") while IFS= read -r name; do [[ $name = main ]] && continue @@ -179,6 +179,7 @@ command_readme() { [[ $body =~ ^\# ]] || body="# The \`$name\` Command\n\n$body" printf "##$body\n\n" done < <(printf "%s\n" "${!help[@]}" | LC_COLLATE=C sort) + echo -e "----\n\n*Autogenerated $(date)*\n" }