]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/libxo/xohtml/xohtml.sh.in
Copy elftoolchain top-level directory from vendor at r260684
[FreeBSD/FreeBSD.git] / contrib / libxo / xohtml / xohtml.sh.in
1 #!/bin/sh
2 #
3 # Copyright (c) 2014, Juniper Networks, Inc.
4 # All rights reserved.
5 # This SOFTWARE is licensed under the LICENSE provided in the
6 # ../Copyright file. By downloading, installing, copying, or otherwise
7 # using the SOFTWARE, you agree to be bound by the terms of that
8 # LICENSE.
9 # Phil Shafer, July 2014
10 #
11
12 BASE=@XO_SHAREDIR@
13 CMD=cat
14 DONE=
15
16 while [ -z "$DONE" -a ! -z "$1" ]; do
17     case "$1" in
18         -b|--base)
19             shift;
20             BASE="$1";
21             shift;
22             ;;
23         -c|--command)
24             shift;
25             CMD="$1";
26             shift;
27             ;;
28         -f|--file)
29             shift;
30             FILE="$1";
31             shift;
32             exec > "$FILE";
33             ;;
34         *)
35             DONE=1;
36             ;;
37     esac
38 done
39
40 echo "<html>\n<head>\n"
41 echo '<meta http-equiv="content-type" content="text/html; charset=utf-8"/>'
42 echo '<link rel="stylesheet" href="'$BASE'/xohtml.css">'
43 echo '<link rel="stylesheet" href="'$BASE'/external/jquery.qtip.css"/>'
44 echo '<script type="text/javascript" src="'$BASE'/external/jquery.js"></script>'
45 echo '<script type="text/javascript" src="'$BASE'/external/jquery.qtip.js"></script>'
46 echo '<script type="text/javascript" src="'$BASE'/xohtml.js"></script>'
47 echo '<script>'
48 echo '</script>'
49 echo "</head>\n<body>\n"
50
51 $CMD
52
53 echo "</body>\n</html>\n"
54
55 exit 0