root/trunk/update_website.sh

Revision 186, 2.8 kB (checked in by zork, 3 months ago)

merged changes from rev #184

  • Property svn:executable set to *
Line 
1 #!/bin/sh
2
3 # simple function to check return code
4 check_error() {
5   if test $? -ne 0; then
6     echo "ERROR doing: $1";
7     exit 1;
8   fi
9 }
10
11 set -x;
12
13 BAKE_DIR=$TMP/debea_publish
14
15 rm -rf $BAKE_DIR
16 check_error 'remove old dir'
17 #svn export svn+ssh://svn@debea.net/repos/debea/branches/debea_1_2 $BAKE_DIR;
18 cp -a . $BAKE_DIR
19 check_error 'checkout sources'
20
21
22 TEMP_BUILD_DIR=$BAKE_DIR/build
23 OUTPUT_DIR=$BAKE_DIR/output
24 BAKEFILE_PATHS=$BAKE_DIR:$OUTPUT_DIR/share/bakefile
25
26 # home is for custom bakefile and wx installation
27 DEBEA_ACLOCAL_FLAGS="-I $BAKE_DIR/aclocal -I $HOME/share/aclocal"
28 export BAKEFILE_PATHS DEBEA_ACLOCAL_FLAGS
29
30
31 # bake project files
32 cd $BAKE_DIR/dba;
33 bakefilize -c
34 check_error 'dba bakefilize'
35 bakefile_gen -d dba.bkgen
36 check_error 'dba bakefile_gen'
37 aclocal $DEBEA_ACLOCAL_FLAGS
38 check_error 'dba aclocal'
39 autoconf
40 check_error 'dba autoconf'
41
42 # build doxygen documentation
43 rm -rf $TEMP_BUILD_DIR $OUTPUT_DIR
44 mkdir -p $TEMP_BUILD_DIR $OUTPUT_DIR
45 cd $TEMP_BUILD_DIR
46 echo -n $OUTPUT_DIR
47 $BAKE_DIR/dba/configure --prefix=$OUTPUT_DIR --enable-docs --with-doc-section=web
48 check_error 'dba configure'
49
50 # build doxygen documentation
51 make docs;
52 check_error 'dba make docs'
53 make;
54 check_error 'dba make'
55 make install;
56 check_error 'dba make install'
57 make doc-install;
58 check_error 'dba make doc-install'
59
60 cd $BAKE_DIR/wxdba;
61 bakefilize -c
62 check_error 'wxdba bakefilize'
63 bakefile_gen -d wxdba.bkgen
64 check_error 'wxdba bakefile_gen'
65 aclocal $DEBEA_ACLOCAL_FLAGS
66 check_error 'wxdba aclocal'
67 autoconf
68 check_error 'wxdba autoconf'
69
70
71 # discover version
72 DEBEA_VERSION=$($OUTPUT_DIR/bin/dba-config --version)
73
74 # create source tarballs/zips
75 cd $BAKE_DIR/
76 mv dba dba-$DEBEA_VERSION;
77 check_error 'dba rename'
78 mv wxdba wxdba-$DEBEA_VERSION;
79 check_error 'wxdba rename'
80
81 tar zcvvf $OUTPUT_DIR/dba-$DEBEA_VERSION.tar.gz dba-$DEBEA_VERSION
82 check_error 'dba tgz'
83 tar zcvvf $OUTPUT_DIR/wxdba-$DEBEA_VERSION.tar.gz wxdba-$DEBEA_VERSION
84 check_error 'wxdba tgz'
85 zip -r $OUTPUT_DIR/dba-$DEBEA_VERSION.zip dba-$DEBEA_VERSION
86 check_error 'dba zip'
87 zip -r $OUTPUT_DIR/wxdba-$DEBEA_VERSION.zip wxdba-$DEBEA_VERSION
88 check_error 'wxdba zip'
89
90 # tarball/zip docs
91 cd $OUTPUT_DIR/share/doc/dba/
92 mv html dba-docs-html-$DEBEA_VERSION;
93 check_error 'dba docs rename'
94 tar zcvvf $OUTPUT_DIR/debea-docs-$DEBEA_VERSION.tar.gz dba-docs-html-$DEBEA_VERSION
95 check_error 'dba docs tgz'
96 zip -r $OUTPUT_DIR/debea-docs-$DEBEA_VERSION.zip dba-docs-html-$DEBEA_VERSION
97 check_error 'dba docs zip'
98
99 cd $BAKE_DIR;
100
101 # publish archives and documentation on website
102 #scp debea-docs-$DEBEA_VERSION.tar.gz debea-docs-$DEBEA_VERSION.zip dba-$DEBEA_VERSION.tar.gz wxdba-$DEBEA_VERSION.tar.gz dba-$DEBEA_VERSION.zip wxdba-$DEBEA_VERSION.zip zork@debea.net:$DEBEA_WEB_DIR/download/
103 #scp $BAKE_DIR/make_stable_release.sh zork@debea.net:$DEBEA_WEB_DIR
104 #ssh zork@debea.net -c "make_stable_release.sh $DEBEA_VERSION"
Note: See TracBrowser for help on using the browser.