| Index: docs/src/make_docs.sh
|
| diff --git a/git_docs/make_docs.sh b/docs/src/make_docs.sh
|
| similarity index 56%
|
| rename from git_docs/make_docs.sh
|
| rename to docs/src/make_docs.sh
|
| index efde5d86dd4267b9a6c87924bd8f4ccc0d4349eb..c64992ca57a2d96644f9f6fd5e9665210dd93d51 100755
|
| --- a/git_docs/make_docs.sh
|
| +++ b/docs/src/make_docs.sh
|
| @@ -42,19 +42,99 @@ then
|
|
|
| # Replace the 'source' and 'package' strings.
|
| ed git/Documentation/asciidoc.conf <<EOF
|
| - H
|
| - 81
|
| - s/Git/depot_tools
|
| - +2
|
| - s/Git Manual/Chromium depot_tools Manual
|
| - wq
|
| +H
|
| +81
|
| +s/Git/depot_tools
|
| ++2
|
| +s/Git Manual/Chromium depot_tools Manual
|
| +wq
|
| EOF
|
| +
|
| + # fix Makefile to include non-_-prefixed files as MAN1 entries
|
| + {
|
| + shopt -s extglob
|
| + echo H
|
| + echo 16
|
| + for x in "$(echo !(git-*|_*).txt)"
|
| + do
|
| + echo i
|
| + echo MAN1_TXT += $x
|
| + echo .
|
| + done
|
| + echo wq
|
| + } | ed git/Documentation/Makefile
|
| +
|
| + # fix build-docdep.perl to ignore attributes on include::[] macros
|
| + ed git/Documentation/build-docdep.perl <<EOF
|
| +H
|
| +12
|
| +c
|
| + s/\[[^]]*\]//;
|
| +.
|
| +wq
|
| +EOF
|
| +
|
| + # Add additional CSS override file
|
| + ed git/Documentation/Makefile <<EOF
|
| +H
|
| +/ASCIIDOC_EXTRA
|
| +a
|
| + -a stylesheet=$(pwd)/git/Documentation/asciidoc-override.css
|
| +.
|
| +-1
|
| +j
|
| +/^\$(MAN_HTML):
|
| +a
|
| + asciidoc-override.css
|
| +.
|
| +-1
|
| +j
|
| +wq
|
| +EOF
|
| +
|
| fi
|
| echo Git up to date at $GITHASH \($BRANCH\)
|
|
|
| +# build directory files for 'essential' and 'helper' sections of the depot_tools
|
| +# manpage.
|
| +for category in helper essential
|
| +do
|
| + {
|
| + PRINTED_BANNER=0
|
| + for x in *.${category}.txt
|
| + do
|
| + # If we actually have tools in the category, print the banner first.
|
| + if [[ $PRINTED_BANNER != 1 ]]
|
| + then
|
| + PRINTED_BANNER=1
|
| + # ex.
|
| + # CATEGORY TOOLS
|
| + # --------------
|
| + BANNER=$(echo $category tools | awk '{print toupper($0)}')
|
| + echo $BANNER
|
| + for i in $(seq 1 ${#BANNER})
|
| + do
|
| + echo -n -
|
| + done
|
| + echo
|
| + echo
|
| + fi
|
| +
|
| + # ex.
|
| + # linkgit:git-tool[1]::
|
| + # \tinclude::_git-tool_desc.category.txt[]
|
| + PLAIN_PATH=${x%%_desc.*.txt}
|
| + PLAIN_PATH=${PLAIN_PATH:1}
|
| + echo "linkgit:$PLAIN_PATH[1]::"
|
| + echo -e "include::${x}[]"
|
| + echo
|
| + done
|
| + } > __${category}.txt
|
| +done
|
| +
|
| HTML_TARGETS=()
|
| MAN_TARGETS=()
|
| -for x in *.txt
|
| +for x in *.txt *.css
|
| do
|
| TO="git/Documentation/$x"
|
| if [[ ! -f "$TO" ]] || ! cmp --silent "$x" "$TO"
|
| @@ -64,7 +144,7 @@ do
|
| fi
|
| # Exclude files beginning with _ from the target list. This is useful to have
|
| # includable snippet files.
|
| - if [[ ${x:0:1} != _ ]]
|
| + if [[ ${x:0:1} != _ && ${x:(-4)} == .txt ]]
|
| then
|
| HTML_TARGETS+=("${x%%.txt}.html")
|
| MAN_TARGETS+=("${x%%.txt}.1")
|
| @@ -87,11 +167,10 @@ fi
|
| make -j"$[${#MAN_TARGETS} + ${#HTML_TARGETS}]" "${MAN_TARGETS[@]}" "${HTML_TARGETS[@]}"
|
| )
|
|
|
| -mkdir htmlout 2> /dev/null || true
|
| for x in "${HTML_TARGETS[@]}"
|
| do
|
| - echo Copying htmlout/$x
|
| - cp "git/Documentation/$x" htmlout
|
| + echo Copying ../html/$x
|
| + tr -d '\015' <"git/Documentation/$x" >"../html/$x"
|
| done
|
|
|
| for x in "${MAN_TARGETS[@]}"
|
|
|