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