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