File: make-docs-pdf-index

package info (click to toggle)
linuxcnc 1%3A2.9.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 285,604 kB
  • sloc: python: 202,568; ansic: 109,036; cpp: 99,239; tcl: 16,054; xml: 10,631; sh: 10,303; makefile: 1,255; javascript: 138; sql: 72; asm: 15
file content (27 lines) | stat: -rwxr-xr-x 616 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
#
# Make a pretty(?) index page of the PDF docs.
#

set -e

# Assume we're running in src/, we can't call `git rev-parse
# --show-toplevel` because when building from dsc we don't have a
# git repo.
TOPLEVEL=${PWD}/..
cd ${TOPLEVEL}/docs

TITLE="LinuxCNC PDF docs ($(cat ${TOPLEVEL}/VERSION))"

rm -f index.html

echo "<html>" >> index.html
echo "<head><title>${TITLE}</title></head>" >> index.html
echo "<body><h1>${TITLE}</h1><p>" >> index.html

for F in $(ls -1 *.pdf | sort); do
    echo "    <a href=\"${F}\">$F</a><br>" >> index.html
done

echo "</body>" >> index.html
echo "</html>" >> index.html