]> git.saurik.com Git - wxWidgets.git/blame - distrib/scripts/pre-flight.sh
Added native GTK+ sash drawing to wxAUI.
[wxWidgets.git] / distrib / scripts / pre-flight.sh
CommitLineData
03a2668f
KO
1#!/bin/sh
2
2dfa1180
KO
3if [ "$VERSION" = "" ]; then
4 echo "Including build-environ.cfg"
5 . scripts/build-environ.cfg
6fi
7
8echo "$WX_TEMP_DIR"
03a2668f
KO
9
10START_DIR="$PWD"
8afb1dca 11SCRIPTDIR=${START_DIR}/scripts
03a2668f
KO
12WX_WEB_DIR=$WX_TEMP_DIR/wxWebSite
13WX_SRC_DIR=$WX_TEMP_DIR/wxWidgets
0d54dc7c 14
759f0e41 15CURDATE=`date -I`
03a2668f
KO
16
17# first, grab the latest revision with specified tag
18if [ ! -d $WX_TEMP_DIR ]; then
19 mkdir $WX_TEMP_DIR
20fi
21
22cd $WX_TEMP_DIR
23
24# just do an update if we started a build but it failed somewhere
25if [ ! -d $WX_WEB_DIR ]; then
26 cvs -d:pserver:anoncvs:anoncvs@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets login
27 echo "Grabbing wxWebSite sources..."
28 cvs -d:pserver:anoncvs@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets checkout wxWebSite
29else
30 cd $WX_WEB_DIR
31 cvs update -d
32fi
33
34if [ ! -d $WX_SRC_DIR ]; then
35 cvs -d:pserver:anoncvs:anoncvs@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets login
36 echo "Grabbing wx CVS with tag $BUILD_TAG"
37 cvs -d:pserver:anoncvs@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets checkout -r $BUILD_TAG wxWidgets
38else
39 cd $WX_SRC_DIR
40 cvs update -d
41fi
42
43# this is where we will store the wxAll tarball we create
eb33893c
KO
44if [ ! -d $START_DIR/$DISTDIR ]; then
45 mkdir -p $START_DIR/$DISTDIR
03a2668f
KO
46fi
47
48#re-bake the bakefiles
49if [ $rebake = "yes" ]; then
50 cd $WX_SRC_DIR/build/bakefiles
6dc001c8
CE
51 # always rebuild the bakefiles to avoid conflicts with cvs
52 ## better to not use unix2dos on the wxWidgets tree so we don't get the conflicts
53 ##fix this -B gave an option not recognised error (sf bug 1537221)...
54 rm .ba*
e7ac4132 55 bakefile_gen -d ../../distrib/scripts/Bakefiles.release.bkgen
03a2668f
KO
56fi
57
58cd $WX_SRC_DIR
59if [ ! -d $WX_SRC_DIR/deliver ]; then
60 mkdir $WX_SRC_DIR/deliver
61fi
62
c877c0c3 63# Now generate the mega tarball with everything. We will push this to our build machines.
03a2668f
KO
64
65cd $WX_TEMP_DIR
2dfa1180
KO
66export APPDIR=$WX_TEMP_DIR/wxWidgets
67export WXWIN=$WX_TEMP_DIR/wxWidgets
68export VERSION=$BUILD_VERSION
8afb1dca
CE
69export SCRIPTDIR=${SCRIPTDIR}
70
7603e74b 71#remove old files
2dfa1180 72rm -rf $APPDIR/deliver/*
7603e74b 73rm -rf $START_DIR/$DIST_DIR/*
2dfa1180 74
7603e74b 75tar czf $START_DIR/$DIST_DIR/wxWidgets-snapshot-$BUILD_VERSION.tar.gz `basename $APPDIR`
2dfa1180
KO
76
77#export DESTDIR=$STAGING_DIR
8afb1dca 78cp $SCRIPTDIR/create_archives.sh $APPDIR/distrib/scripts
2dfa1180
KO
79chmod +x $APPDIR/distrib/scripts/create_archives.sh
80$APPDIR/distrib/scripts/create_archives.sh --all
81
82# copy all the archives we created to the master machine's deliver directory
83cp $APPDIR/deliver/*.zip $START_DIR/$DIST_DIR
84cp $APPDIR/deliver/*.tar.gz $START_DIR/$DIST_DIR
85cp $APPDIR/deliver/*.tar.bz2 $START_DIR/$DIST_DIR
03a2668f 86
8afb1dca 87echo "Tarballs located at: $START_DIR/$DIST_DIR"
03a2668f
KO
88
89if [ ! -f $WX_TARBALL ]; then
90 echo "ERROR: wxAll tarball was not created by pre-flight.sh. Build cannot continue."
91 exit 1
92else
93 cd $START_DIR
2dfa1180
KO
94 #cp $WX_TARBALL $STAGING_DIR
95 #cp -r $WX_WEB_DIR $STAGING_DIR
03a2668f 96
03a2668f
KO
97 echo "Pre-flight complete. Ready for takeoff."
98fi
759f0e41
CE
99
100if [ "$KIND" = "daily" ]; then
101 ##delete old files and then copy new ones, add a symlink
102 find ${FTPDIR}/files -type f -name wx\* -mtime +6 | xargs rm -rf
103 cp $START_DIR/$DIST_DIR/wx* ${FTPDIR}/files
104
105 rm -f ${FTPDIR}/wx* ${FTPDIR}/MD5SUM
106 for f in `find ${FTPDIR}/files -type f -name wx\* -mmin -601` ; do
107 ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" `
108 done
109else
110 ## not a daily build
a4b57b1d
CE
111 ##get install.txt files etc
112 ##.../docs/plat/install.txt goes to install-plat-2.7.0.txt
113 ## wince has a file down one dir
114 cp ${DOCDIR}/changes.txt $START_DIR/$DIST_DIR/changes-${BUILD_VERSION}.txt
115
116 for f in `find ${DOCDIR} -name install.txt` ; do
117 cp $f $START_DIR/$DIST_DIR/install-`echo $f | sed -e "s|${DOCDIR}||g" | sed -e "s|/install.txt||g"`-${BUILD_VERSION}.txt
118 done
119
120 for g in `find ${DOCDIR} -name readme.txt` ; do
121 cp $g $START_DIR/$DIST_DIR/readme-`echo $g | sed -e "s|${DOCDIR}||g" | sed -e "s|msw/wince|wince|g" | sed -e "s|/readme.txt||g"`-${BUILD_VERSION}.txt
122 done
123 ## copy files ...
759f0e41 124 mkdir ${FTPDIR}/
a4b57b1d
CE
125 cp $START_DIR/$DIST_DIR/* ${FTPDIR}/
126
759f0e41
CE
127fi
128
129md5sum ${FTPDIR}/wx* > ${FTPDIR}/MD5SUM
130
131## make sure updated at is really last
132sleep 10
133echo cvs checkout done at date -u > ${FTPDIR}/updated_at.txt
134
135echo "Delivery complete. Flying."