Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/Documentation/technical/api-index.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / Documentation / technical / api-index.sh` 39 lines ยท 714 bytes Raw Blame History 1 #!/bin/sh 2 3 if test $# -ne 2 4 then 5 echo >&2 "USAGE: $0 " 6 exit 1 7 fi 8 9 SOURCE_DIR="$1" 10 OUTPUT="$2" 11 12 ( 13 cd "$SOURCE_DIR" 14 15 c=//////////////////////////////////////////////////////////////// 16 skel=api-index-skel.adoc 17 sed -e '/^\/\/ table of contents begin/q' "$skel" 18 echo "$c" 19 20 ls api-*.adoc | 21 while read filename 22 do 23 case "$filename" in 24 api-index-skel.adoc | api-index.adoc) continue ;; 25 esac 26 title=$(sed -e 1q "$filename") 27 html=${filename%.adoc}.html 28 echo "* link:$html[$title]" 29 done 30 echo "$c" 31 sed -n -e '/^\/\/ table of contents end/,$p' "$skel" 32 ) >"$OUTPUT"+ 33 34 if test -f "$OUTPUT" && cmp "$OUTPUT" "$OUTPUT"+ >/dev/null 35 then 36 rm -f "$OUTPUT"+ 37 else 38 mv "$OUTPUT"+ "$OUTPUT" 39 fi