diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-10-26 10:35:13 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-10-26 10:35:13 -0700 |
commit | 997a4e139f58f05bac5985f6152ff5024ae0b5e4 (patch) | |
tree | c0f543497e503c7a446ec54a7d224ff4fffbe10d | |
parent | f157378539d3f203f466fa79821e8e8880a4bf43 (diff) | |
download | git-997a4e139f58f05bac5985f6152ff5024ae0b5e4.tar.gz |
Dothem: allow using Asciidoctor
-rwxr-xr-x | Dothem | 31 |
1 files changed, 26 insertions, 5 deletions
@@ -17,7 +17,7 @@ inst_prefix=$( echo $HOME ) -force= with_dash= test_long= M= install= nodoc= notest= bootstrap= branches= jobs= +force= with_dash= test_long= M= install= doc= notest= bootstrap= branches= jobs= scratch= noprove= memtrash=--memtrash with_cocci= san= while case "$1" in --pedantic | --locale=* | --loose) M="$M $1" ;; @@ -27,7 +27,9 @@ while case "$1" in --no-cocci) with_cocci= ;; --long) test_long=--long ;; --noinstall) install=noinstall ;; - --nodoc) nodoc=y ;; + --nodoc) doc=no ;; + --asciidoc) doc=asciidoc ;; + --asciidoctor) doc=ascidoctor ;; --notest) notest=y ;; --nomemtrash) memtrash= ;; --memtrash) memtrash=--memtrash ;; @@ -47,7 +49,25 @@ do shift done -sh -c 'asciidoc --version >/dev/null 2>&1' || nodoc=y +if test -n "$doc" +then + : ;# happy with whatever specified +elif sh -c 'asciidoc --version >/dev/null 2>&1' +then + doc=asciidoc +elif sh -c 'asciidoctor --version >/dev/null 2>&1' +then + doc=asciidoctor +else + doc=no +fi + +if test "$doc" = asciidoctor +then + USE_ASCIIDOCTOR=YesPlease +else + USE_ASCIIDOCTOR= +fi GIT_TEST_CHAIN_LINT=1 export GIT_TEST_CHAIN_LINT @@ -136,7 +156,8 @@ do vtree=$(git rev-parse --verify "$version^{tree}") rtree=$(git rev-parse --verify "$revision^{tree}") ( - skip_test=$notest skip_doc=$nodoc + skip_test=$notest + case "$doc" in no) skip_doc=1 ;; *) skip_doc= ;; esac case "$force" in ?*) ;; @@ -231,7 +252,7 @@ do if test "$save" = "$(git rev-parse HEAD)" then Meta/Make $M $jobs -- check-docs && - Meta/Make $M $jobs -- doc && + Meta/Make $M $jobs -- $USE_ASCIIDOCTOR doc && Meta/Make $M -- install-man install-html else echo >&2 "Head moved--not installing docs" |