3 # Prepare documentation for http://jonas.nitro.dk/tig/
5 # Copyright (c) 2009-2014 Jonas Fonseca <jonas.fonseca@gmail.com>
7 LATEST
="$(git describe | sed 's/-[0-9]*-g[0-9a-f]*//')"
8 DOCDIR
="doc/release-docs/"
11 <script type=\"text/javascript\">
12 var gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\");
13 document.write(unescape(\"%3Cscript src='\" + gaJsHost + \"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E\"));
15 <script type=\"text/javascript\">
17 var pageTracker = _gat._getTracker(\"UA-7492166-1\");
18 pageTracker._trackPageview();
19 } catch(err) {}</script>
22 mkdir
-p "$DOCDIR/releases"
24 for file in doc
/tig
.1.html
doc
/tigrc
.5.html
doc
/manual.html README.html NEWS.html INSTALL.html
; do
26 git cat-file blob release
:$file > tmp
27 grep -v '</body>' < tmp |
grep -v '</html>'
29 if grep -q '</body>' tmp
; then
32 } > "$DOCDIR/$(basename "$file")"
35 mv "$DOCDIR/README.html" tmp
41 <p>Latest version of tig is <b>
42 <a href="$LATEST.tar.gz">$LATEST</a>
43 <a href="$LATEST.tar.gz.md5">(md5)</a></b>.</p>
44 <p>See <a href="../NEWS.html">the release notes</a>
45 for information about each release.</p>
49 } > "$DOCDIR/releases/HEADER.html"
51 head -n 2 < tmp
> "$DOCDIR/HEADER.html"
52 sed -n '3,$p' < tmp
> "$DOCDIR/README.html"