Now we can build all tarballs on one (Unix shell) box using pre-flight.sh.
[wxWidgets.git] / distrib / scripts / pre-flight.sh
1 #!/bin/sh
2
3 if [ "$VERSION" = "" ]; then
4 echo "Including build-environ.cfg"
5 . scripts/build-environ.cfg
6 fi
7
8 echo "$WX_TEMP_DIR"
9
10 START_DIR="$PWD"
11 WX_WEB_DIR=$WX_TEMP_DIR/wxWebSite
12 WX_SRC_DIR=$WX_TEMP_DIR/wxWidgets
13
14 # first, grab the latest revision with specified tag
15 if [ ! -d $WX_TEMP_DIR ]; then
16 mkdir $WX_TEMP_DIR
17 fi
18
19 cd $WX_TEMP_DIR
20
21 # just do an update if we started a build but it failed somewhere
22 if [ ! -d $WX_WEB_DIR ]; then
23 cvs -d:pserver:anoncvs:anoncvs@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets login
24 echo "Grabbing wxWebSite sources..."
25 cvs -d:pserver:anoncvs@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets checkout wxWebSite
26 else
27 cd $WX_WEB_DIR
28 cvs update -d
29 fi
30
31 if [ ! -d $WX_SRC_DIR ]; then
32 cvs -d:pserver:anoncvs:anoncvs@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets login
33 echo "Grabbing wx CVS with tag $BUILD_TAG"
34 cvs -d:pserver:anoncvs@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets checkout -r $BUILD_TAG wxWidgets
35 else
36 cd $WX_SRC_DIR
37 cvs update -d
38 fi
39
40 # this is where we will store the wxAll tarball we create
41 if [ ! -d $DISTDIR ]; then
42 mkdir $DISTDIR
43 fi
44
45 #re-bake the bakefiles
46 if [ $rebake = "yes" ]; then
47 cd $WX_SRC_DIR/build/bakefiles
48 bakefile_gen -d ../../distrib/scripts/Bakefiles.release.bkgen
49 fi
50
51 cd $WX_SRC_DIR
52 if [ ! -d $WX_SRC_DIR/deliver ]; then
53 mkdir $WX_SRC_DIR/deliver
54 fi
55
56 # Now generate the mega tarball with everything. We will push this to our build machines.
57
58 cd $WX_TEMP_DIR
59 export APPDIR=$WX_TEMP_DIR/wxWidgets
60 export WXWIN=$WX_TEMP_DIR/wxWidgets
61 export VERSION=$BUILD_VERSION
62 rm -rf $APPDIR/deliver/*
63
64 tar czvf $START_DIR/$DIST_DIR/wxWidgets-$BUILD_VERSION-snapshot.tar.gz $APPDIR
65
66 #export DESTDIR=$STAGING_DIR
67 cp $START_DIR/scripts/create_archives.sh $APPDIR/distrib/scripts
68 chmod +x $APPDIR/distrib/scripts/create_archives.sh
69 $APPDIR/distrib/scripts/create_archives.sh --all
70
71 # copy all the archives we created to the master machine's deliver directory
72 cp $APPDIR/deliver/*.zip $START_DIR/$DIST_DIR
73 cp $APPDIR/deliver/*.tar.gz $START_DIR/$DIST_DIR
74 cp $APPDIR/deliver/*.tar.bz2 $START_DIR/$DIST_DIR
75
76 echo "Tarball located at: $WX_TARBALL"
77
78 if [ ! -f $WX_TARBALL ]; then
79 echo "ERROR: wxAll tarball was not created by pre-flight.sh. Build cannot continue."
80 exit 1
81 else
82 cd $START_DIR
83 #cp $WX_TARBALL $STAGING_DIR
84 #cp -r $WX_WEB_DIR $STAGING_DIR
85
86 echo "Pre-flight complete. Ready for takeoff."
87 fi