From f076565a981b28e95d8b443319dbb5c5b8037593 Mon Sep 17 00:00:00 2001 From: nickl- Date: Sun, 22 Jul 2012 18:56:24 +0200 Subject: [PATCH] Generate only a single manual. Added the ability to pass the .md document template as argument to manning-up.sh which will only generate the single document and rename the .1.html correctly before exiting and thus not building the index and all the docs again. Includes updated documentation. --- man/Readme.md | 4 ++++ man/manning-up.sh | 2 ++ 2 files changed, 6 insertions(+) diff --git a/man/Readme.md b/man/Readme.md index 811ddc7..5d6af16 100644 --- a/man/Readme.md +++ b/man/Readme.md @@ -35,6 +35,10 @@ Alternatively you can run the `manning-up.sh` automated shell script included in $ ./manning-up.sh +To only (re)generate a specific .md manual template and have `.1.html` renamed to `.html` yau may also use manning-up.sh. + + $ ./manning-up.sh git-info.md + ## AUTHOR Written by Leila Muhtasib <> diff --git a/man/manning-up.sh b/man/manning-up.sh index bd9fe15..a76eddf 100755 --- a/man/manning-up.sh +++ b/man/manning-up.sh @@ -1,5 +1,7 @@ #!/bin/bash +test "$1" && ronn $1 && mv -f ${1/.md/}.1.html ${1/.md/}.html && exit 0 + echo '# manuals' > index.txt.tmp ln=$(awk '/## COMMANDS/{print NR};' ./git-extras.md) awk "NR <= $ln+1" git-extras.md > git-extras.md.tmp