Skip to content

Commit

Permalink
Generalize gendocs.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
b0o committed Feb 23, 2021
1 parent 0b1f836 commit 0ca01b7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/gendocs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ declare -g basedir reporoot readme
basedir="$(realpath -e "$(dirname "$(readlink -e "${BASH_SOURCE[0]}")")")"
reporoot="$(realpath -e "$basedir/..")"
readme="$reporoot/README.md"
usage_cmd="$reporoot/snag -h"

function readme() {
awk '
awk -v "usage_cmd=$usage_cmd" '
BEGIN {
d = 0
}
Expand All @@ -36,7 +37,7 @@ function readme() {
d = 1
print $0
print "```"
system("./snag -h")
system(usage_cmd)
print "```"
next
}
Expand Down

0 comments on commit 0ca01b7

Please sign in to comment.