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