File: update_toc

package info (click to toggle)
node-wikibase-sdk 8.1.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,620 kB
  • sloc: javascript: 3,514; sh: 64; makefile: 2
file content (12 lines) | stat: -rwxr-xr-x 523 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env bash
which doctoc > /dev/null || {
  echo "requires to have https://www.npmjs.com/package/doctoc installed, either globally or just in this repo"
  echo "(it is not installed as a dev dependency as the use made of it is not worth the subdependencies maintainance)"
  exit 1
}

docs_with_doctoc=$(grep -r 'Summary' docs | sed 's/:.*//')
doctoc README.md $docs_with_doctoc

# Override summuries to directly link to the right doc
sed -i 's/#simplify-claims/simplify_claims.md/' ./docs/simplify_entities_data.md