File: gen_menu.sh

package info (click to toggle)
tup 0.8-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,076 kB
  • sloc: ansic: 256,651; sh: 19,101; perl: 184; python: 67; lisp: 63; makefile: 56
file content (38 lines) | stat: -rwxr-xr-x 927 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
28
29
30
31
32
33
34
35
36
37
38
#! /bin/sh -e

example=""
if [ $1 = "-x" ]; then
	shift
	example=$1
	shift
fi

luaexample=""
if [ $1 = "-l" ]; then
	shift
	luaexample=$1
	shift
fi

cat << HERE
  <ul id="menu">
    <li class="menu-header">Site Map</li>
HERE
for i in $@; do
	text=`./gen_text.sh $i`
	echo "    <li class=\"menu-item\"><a href=\"$i\">$text</a></li>"
	if [ "$i" = "examples.html" ]; then
		cat $example
	fi
	if [ "$i" = "lua_parser.html" ]; then
		cat $luaexample
	fi
done

cat << HERE
    <li class="menu-item"><iframe src="https://github.com/sponsors/gittup/button" title="Sponsor gittup" height="35" width="116" style="border: 0;"></iframe></li>
    <li class="menu-header">Additional Info</li>
    <li class="menu-item"><a href="build_system_rules_and_algorithms.pdf">Build System Rules<br>and Algorithms (PDF)</a></li>
    <li class="menu-item"><a href="http://groups.google.com/group/tup-users">tup-users mailing list</a></li>
  </ul>
HERE