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