]> git.stg.codes - stg.git/blob - projects/make_tarball/make.sh
Add missing documentation.
[stg.git] / projects / make_tarball / make.sh
1 #!/bin/sh
2
3 if [ "$1" != "" ]
4 then
5     SRC_DIR="$1"
6 else
7     PREFIX="stg-2.4"
8     SRC_DIR=$(date "+${PREFIX}-%Y.%m.%d-%H.%M.%S")
9 fi
10
11 ARC_NAME=$SRC_DIR.tar.gz
12
13 git clone git@stg.codes:stg.git -b stg-2.409 $SRC_DIR
14
15 if [ $? != 0 ]
16 then
17     echo "Failed to clone repository"
18     exit -1
19 fi
20
21 rm -rf $SRC_DIR/.git
22 rm -f $SRC_DIR/.gitignore
23 rm -r $SRC_DIR/projects/make_tarball
24 rm -r $SRC_DIR/projects/sgauthstress
25 rm -r $SRC_DIR/projects/rlm_stg
26 rm -r $SRC_DIR/projects/stargazer/plugins/authorization/stress
27 rm -r $SRC_DIR/doc/help
28 rm $SRC_DIR/doc/help.odt
29
30 if [ -f /usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl ]
31 then
32     echo "Building doc..."
33     make -C $SRC_DIR/doc/xmlrpc
34     make -C $SRC_DIR/doc/help
35 else
36     echo "No XSL stylesheets, skipping doc build"
37 fi
38
39 tar -zcf $ARC_NAME $SRC_DIR