3 # create wx tarballs automatically given a tag, or from CVS HEAD
25 # sorry folks, I couldn't resist. :-)
27 echo "It's the tar-o-matic 2000! It slices! It dices! It..."
28 echo "Grabs CVS revisions and generates complete tarballs from them!!"
31 echo "- Do not use tar-o-matic while intoxicated."
32 echo "- Do not use tar-o-matic while driving."
33 echo "- Do not use tar-o-matic while driving intoxicated."
34 echo "- Keep tar-o-matic away from small children. Large ones too."
35 echo "- Tar-o-matic is not for use as a life-saving device."
36 echo "- Do not call tar-o-matic nasty names. It really hates that."
37 echo "- Avoid developing strong emotional attachment to tar-o-matic."
38 echo "- Keep tar-o-matic away from unmonitored internet connections."
39 echo "- Don't say we didn't warn you."
41 echo "In case of malfunction, let tar-o-matic know that it is special."
46 echo Usage
: $PROGNAME " version-number cvs-revision [ options ]"
48 echo " --help Display this help message"
49 echo " --wxgtk Spin wxGTK"
50 echo " --wxbase Spin wxBase"
51 echo " --wxx11 Spin wxX11"
52 echo " --wxmotif Spin wxMotif"
53 echo " --wxmac Spin wxMac"
54 echo " --wxmgl Spin wxMGL"
55 echo " --wxall Spin wxALL"
56 echo " --wxmsw Spin wxMSW"
57 echo " --docs Spin docs"
58 echo " --all Spin EVERYTHING"
59 echo " --updatecvs Update from CVS"
60 echo " --silent Don't prompt whenever possible"
61 echo " only for use with revisions > 2.6.1"
62 echo " --about about $PROGNAME"
65 echo "- Set EXTRASDIR environment variable to have any zip files"
66 echo " in that directory copied into deliver/extra for inclusion."
67 echo "- Set WXDISTDIR environment variable to have completed "
68 echo " tarballs put in that directory. This allows for things like"
69 echo " setting a network path for all machines to send files to."
70 echo "- EXTRASDIR defaults to ./extra and WXDISTDIR defaults to ./deliver"
75 if [ "$1" = "" ] || [ "$1" = "--help" ]; then
80 if [ "$1" = "--about" ]; then
88 FINDTAG
=`echo "$1" | sed /\-\-/p`
89 if [ FINDTAG
!= "" ]; then
96 --wxx11) SPINWXX11
=1 ;;
97 --wxgtk) SPINWXGTK
=1 ;;
98 --wxmac) SPINWXMAC
=1 ;;
99 --wxbase) SPINWXBASE
=1 ;;
100 --wxmgl) SPINWXMGL
=1 ;;
101 --wxmsw) SPINWXMSW
=1 ;;
102 --wxmotif) SPINWXMOTIF
=1 ;;
103 --docs) SPINDOCS
=1 ;;
104 --all) SPINEVERYTHING
=1 ;;
105 --rebake) REBAKE
=1 ;;
106 --silent) SILENTFLAG
="--silent" ;;
107 --clean-build) CLEANBUILD
=1 ;;
115 # checkout wx sources to this tree
116 if [ -d .
/temp
-wx ]; then
120 mkdir $STARTDIR/temp
-wx
121 WXDIR
="$STARTDIR/temp-wx/wxWidgets"
124 if [ "$TAG" != "" ]; then
125 echo "Checking out wxWidgets revision: $TAG"
128 echo "Checking out wxWidgets HEAD sources..."
130 echo "" # add a blank line for readability
133 cvs
-d:pserver
:anoncvs
:anoncvs@cvs.wxwidgets.org
:/pack
/cvsroots
/wxwidgets login
135 echo "cvs -d :pserver:anoncvs@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets checkout $TAGNAME wxWidgets"
136 cvs
-d :pserver
:anoncvs@cvs.wxwidgets.org
:/pack
/cvsroots
/wxwidgets checkout
$TAGNAME wxWidgets
138 if [ "$REBAKE" = "1" ]; then
139 echo "TODO! Implement re-baking..."
142 # Copy extra .zips over to deliver/extra so they'll get picked up...
143 if [ ! -d $WXDIR/deliver
]; then
147 if [ ! -d $WXDIR/deliver
/extra
]; then
148 mkdir $WXDIR/deliver
/extra
151 # allow the user to specify extras dir in an environment variable
152 EXTRA_DIR
=$STARTDIR/extra
153 if [ "$EXTRASDIR" != "" ]; then
154 EXTRA_DIR
="$EXTRASDIR"
157 for filename
in $EXTRA_DIR/*.
zip
159 cp $filename $WXDIR/deliver
/extra
162 if [ "$SPINWXMAC" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
164 sh
$WXDIR/distrib
/msw
/tardist
$WXDIR $WXDIR/deliver
$VERSION --wxmac
167 if [ "$SPINEVERYTHING" = "1" ]; then
169 sh
$WXDIR/distrib
/msw
/tardist
$WXDIR $WXDIR/deliver
$VERSION --wxall
172 if [ "$SPINWXMSW" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
174 sh
$WXDIR/distrib
/msw
/makesetup.sh
--wxmsw
177 if [ "$SPINWXBASE" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
179 sh
$WXDIR/distrib
/msw
/maketarballs
$WXDIR $WXDIR/deliver
$VERSION --wxbase $SILENTFLAG
182 if [ "$SPINWXOS2" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
184 sh
$WXDIR/distrib
/msw
/makesetup.sh
--wxos2
187 if [ "$SPINWXGTK" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
189 sh
$WXDIR/distrib
/msw
/maketarballs
$WXDIR $WXDIR/deliver
$VERSION --wxgtk $SILENTFLAG
192 if [ "$SPINWXMOTIF" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
194 sh
$WXDIR/distrib
/msw
/maketarballs
$WXDIR $WXDIR/deliver
$VERSION --wxmotif $SILENTFLAG
197 if [ "$SPINWXMGL" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
199 sh
$WXDIR/distrib
/msw
/maketarballs
$WXDIR $WXDIR/deliver
$VERSION --wxmgl $SILENTFLAG
202 if [ "$SPINWXX11" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
204 sh
$WXDIR/distrib
/msw
/maketarballs
$WXDIR $WXDIR/deliver
$VERSION --wxx11 $SILENTFLAG
207 DISTDIR
="$STARTDIR/deliver"
208 if [ "$WXDISTDIR" != "" ] && [ -d $WXDISTDIR ]; then
212 # delete any old tarballs
213 if [ -d $DISTDIR ]; then
219 # copy over the created tarballs
220 cp $WXDIR/deliver
/*.gz
$DISTDIR
221 cp $WXDIR/deliver
/*.bz2
$DISTDIR
222 cp $WXDIR/deliver
/*.
zip $DISTDIR