From d5c1d2d37898ae3a4ddda11c9244f466e7fff4e2 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Fri, 2 Oct 2020 12:53:04 -0700 Subject: [PATCH] install.sh: install formatted markdown docs At some point the formatted documentation will be referred to by other documentation. Go ahead and format it and install it to a "gfm" (Girocco flavored markdown) directory to make it available for reference. Signed-off-by: Kyle J. McKay --- install.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/install.sh b/install.sh index 5144738..926b425 100755 --- a/install.sh +++ b/install.sh @@ -1083,6 +1083,15 @@ for tf in "$basedir/html"/*.html; do rm -f "$tf" done +echo "*** Formatting markdown documentation..." +mkdir -p "$cgiroot/html/gfm" +for d in basics.md syntax.md; do + <"markdown.git/$d" LC_ALL=C sed -e '/\[[Ll]icense\]/d' \ + -e 's, \([a-z][a-z]*\)\.md, /markdown.git/blob/HEAD:/\1.md,' \ + -e 's/ by adding `.md` to the URL//' | + "$perlbin" "markdown.git/Markdown.pl" --stub >"$cgiroot/html/gfm/${d%.md}.html" +done + echo "*** Finalizing permissions and moving into place..." chown -R -h "$cfg_mirror_user""$owngroup" "$basedir" "$webroot" "$cgiroot" -- 2.11.4.GIT