File: update-docs

package info (click to toggle)
systemtap 2.6-0.2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 21,220 kB
  • ctags: 10,944
  • sloc: cpp: 53,239; ansic: 50,615; exp: 33,694; sh: 9,906; xml: 7,665; perl: 2,089; python: 1,534; tcl: 1,236; makefile: 797; java: 148; lisp: 104; awk: 94; asm: 91; sed: 16
file content (114 lines) | stat: -rwxr-xr-x 2,919 bytes parent folder | download
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#!/usr/bin/bash

#check for man2html
#TODO perhaps wget, untar, and automatically use, then remove if we want?
# http://dcssrv1.oit.uci.edu/indiv/ehood/tar/man2html3.0.1.tar.gz

if which man2html &>/dev/null; then
 :
else
echo "Please install man2html package"
exit
fi

# Create the directory we'll be working in

DIR=`mktemp -d stapdocsXXX -p /tmp/`; cd $DIR

# We'll need to build the latest stap with docs, ensure a check that everything built properly or bail

git clone git://sourceware.org/git/systemtap.git

# Checkout the htdocs CVS

cvs -d :ext:sourceware.org:/cvs/systemtap checkout htdocs

BASEDIR=`pwd`
cd systemtap

mkdir build && mkdir local && cd build

../configure --enable-docs --enable-publican --prefix=$BASEDIR/systemtap/local

#Not sure if we're really allowed to make assumptions about the machine we're running this on
#Probably safer not using the -jX option
make
make install
if [ $? -eq 0 ]; then
 : 
else
echo "Make failed, please address build errors"
exit
fi

### LANGREF
cp doc/langref.pdf $BASEDIR/htdocs/

#Something about publicanizing the langref?

rm $BASEDIR/htdocs/langref/*.html
cd $BASEDIR/htdocs
cvs rm && cvs commit -m 'removed langref/*.html'

cd $BASEDIR/systemtap/doc
latex2html -noaddress -show_section_numbers -custom_titles -local_icons -split 4 langref.tex -dir $BASEDIR/htdocs/langref/
cd $BASEDIR/htdocs
cvs add langref/*.html && cvs commit -m 'add new langref/*.html'
cd -
### TUTORIAL
cp $BASEDIR/systemtap/build/doc/tutorial.pdf $BASEDIR/htdocs/
rm $BASEDIR/htdocs/tutorial/*.html

cd $BASEDIR/htdocs
#cvs rm && cvs commit -m 'removed tutorial/*.html'

cd $BASEDIR/systemtap/doc
latex2html -noaddress -show_section_numbers -custom_titles -local_icons -split 4 tutorial.tex -dir $BASEDIR/htdocs/tutorial/

cd $BASEDIR/htdocs
cvs add tutorial/*.html && cvs commit -m 'add new tutorial/*.html'

# beginners guide
# we require xmlto version newer than 0.0.23-3
# TODO add a version check

cd $BASEDIR/systemtap/build/doc/beginners

cp SystemTap_Beginners_Guide.pdf $BASEDIR/htdocs/

#echo 'systemtap_beginners_guide.pdf cp'

rm $BASEDIR/htdocs/SystemTap_Beginners_Guide/*.html
cp -R SystemTap_Beginners_Guide $BASEDIR/htdocs/
#echo 'systemtap_beginners_guide recursive cp'
# tapsets 
cd ../..

cp $BASEDIR/systemtap/build/doc/SystemTap_Tapset_Reference/tapsets.pdf $BASEDIR/htdocs/

#echo 'tapsets.pdf cp'

rm $BASEDIR/htdocs/tapsets/*.html

cp -R $BASEDIR/systemtap/build/doc/SystemTap_Tapset_Reference/tapsets/*.html $BASEDIR/htdocs/tapsets/

cd $BASEDIR/htdocs
cvs add tapsets/*.html && cvs commit -m 'add new tapsets/*.html'

#echo 'tapsets html cp'

# systemtap examples
# run gitweb.php script?
# run examples-index-gen.pl script if needed?

rm man/*.html && cvs rm * && cvs commit -m 'removed man pages'

cd $BASEDIR/htdocs/man

./REGEN.sh $BASEDIR/systemtap/local

cd $BASEDIR/htdocs
cvs add man/*.html && cvs commit -m 'added new man pages'
echo -- $BASEDIR