3 # create wx tarballs automatically given a tag, or from CVS HEAD
23 # sorry folks, I couldn't resist. :-)
25 echo "It's the tar-o-matic 2000! It slices! It dices! It..."
26 echo "Grabs CVS revisions and generates complete tarballs from them!!"
29 echo "- Do not use tar-o-matic while intoxicated."
30 echo "- Do not use tar-o-matic while driving."
31 echo "- Do not use tar-o-matic while driving intoxicated."
32 echo "- Keep tar-o-matic away from small children. Large ones too."
33 echo "- Tar-o-matic is not for use as a life-saving device."
34 echo "- Do not call tar-o-matic nasty names. It really hates that."
35 echo "- Avoid developing strong emotional attachment to tar-o-matic."
36 echo "- Keep tar-o-matic away from unmonitored internet connections."
37 echo "- Don't say we didn't warn you."
39 echo "In case of malfunction, let tar-o-matic know that it is special."
44 echo Usage
: $PROGNAME " version-number cvs-revision [ options ]"
46 echo " --help Display this help message"
47 echo " --wxgtk Spin wxGTK"
48 echo " --wxbase Spin wxBase"
49 echo " --wxx11 Spin wxX11"
50 echo " --wxmotif Spin wxMotif"
51 echo " --wxmac Spin wxMac"
52 echo " --wxmgl Spin wxMGL"
53 echo " --docs Spin docs"
54 echo " --all Spin EVERYTHING"
55 echo " --updatecvs Update from CVS"
56 echo " --silent Don't prompt whenever possible"
57 echo " only for use with revisions > 2.6.1"
58 echo " --about about $PROGNAME"
61 echo "- Set EXTRASDIR environment variable to have any zip files"
62 echo " in that directory copied into deliver/extra for inclusion."
63 echo "- Set WXDISTDIR environment variable to have completed "
64 echo " tarballs put in that directory. This allows for things like"
65 echo " setting a network path for all machines to send files to."
66 echo "- EXTRASDIR defaults to ./extra and WXDISTDIR defaults to ./deliver"
71 if [ "$1" = "" ] || [ "$1" = "--help" ]; then
76 if [ "$1" = "--about" ]; then
83 FINDTAG
=`echo "$1" | sed /\-\-/p`
84 if [ FINDTAG
!= "" ]; then
91 --wxx11) SPINWXX11
=1 ;;
92 --wxgtk) SPINWXGTK
=1 ;;
93 --wxmac) SPINWXMAC
=1 ;;
94 --wxbase) SPINWXBASE
=1 ;;
95 --wxmgl) SPINWXMGL
=1 ;;
96 --wxmotif) SPINWXMOTIF
=1 ;;
98 --all) SPINEVERYTHING
=1 ;;
100 --silent) SILENTFLAG
="--silent" ;;
101 --clean-build) CLEANBUILD
=1 ;;
109 # checkout wx sources to this tree
110 if [ -d .
/temp
-wx ]; then
114 mkdir $STARTDIR/temp
-wx
115 WXDIR
="$STARTDIR/temp-wx/wxWidgets"
118 if [ "$TAG" != "" ]; then
119 echo "Checking out wxWidgets revision: $TAG"
122 echo "Checking out wxWidgets HEAD sources..."
124 echo "" # add a blank line for readability
126 # TODO: look into whether or not we need to keep anonymous password, and if so
127 # add support for something like expect to at least offer the possibility
128 # of automatically entering the password if such a tool is installed
129 # on the user's computer. For now people have to type the password manually...
130 echo "Grabbing source tree, please use 'anoncvs' for the password when prompted..."
132 cvs
-d:pserver
:anoncvs@cvs.wxwidgets.org
:/pack
/cvsroots
/wxwidgets login
134 cvs
-d :pserver
:anoncvs@cvs.wxwidgets.org
:/pack
/cvsroots
/wxwidgets checkout
$TAGNAME wxWidgets
136 #if [ "$REBAKE" = "1" ]; then
140 # Copy extra .zips over to deliver/extra so they'll get picked up...
141 if [ ! -d $WXDIR/deliver
]; then
145 if [ ! -d $WXDIR/deliver
/extra
]; then
146 mkdir $WXDIR/deliver
/extra
149 # allow the user to specify extras dir in an environment variable
150 EXTRA_DIR
=$STARTDIR/extra
151 if [ "$EXTRASDIR" != "" ]; then
152 EXTRA_DIR
="$EXTRASDIR"
155 for filename
in $EXTRA_DIR/*.
zip
157 cp $filename $WXDIR/deliver
/extra
160 if [ "$SPINWXMAC" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
162 sh
$WXDIR/distrib
/msw
/tardist
$WXDIR $WXDIR/deliver
$VERSION --wxmac
165 if [ "$SPINEVERYTHING" = "1" ]; then
167 sh
$WXDIR/distrib
/msw
/tardist
$WXDIR $WXDIR/deliver
$VERSION --wxall
170 if [ "$SPINWXMSW" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
172 sh
$WXDIR/distrib
/msw
/makesetup.sh
--wxmsw
175 if [ "$SPINWXBASE" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
177 sh
$WXDIR/distrib
/msw
/maketarballs
$WXDIR $WXDIR/deliver
$VERSION --wxbase $SILENTFLAG
180 if [ "$SPINWXOS2" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
182 sh
$WXDIR/distrib
/msw
/makesetup.sh
--wxos2
185 if [ "$SPINWXGTK" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
187 sh
$WXDIR/distrib
/msw
/maketarballs
$WXDIR $WXDIR/deliver
$VERSION --wxgtk $SILENTFLAG
190 if [ "$SPINWXMOTIF" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
192 sh
$WXDIR/distrib
/msw
/maketarballs
$WXDIR $WXDIR/deliver
$VERSION --wxmotif $SILENTFLAG
195 if [ "$SPINWXMGL" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
197 sh
$WXDIR/distrib
/msw
/maketarballs
$WXDIR $WXDIR/deliver
$VERSION --wxmgl $SILENTFLAG
200 if [ "$SPINWXX11" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
202 sh
$WXDIR/distrib
/msw
/maketarballs
$WXDIR $WXDIR/deliver
$VERSION --wxx11 $SILENTFLAG
205 DISTDIR
="$STARTDIR/deliver"
206 if [ "$WXDISTDIR" != "" ] && [ -d $WXDISTDIR ]; then
210 # delete any old tarballs
211 if [ -d $DISTDIR ]; then
217 # copy over the created tarballs
218 cp $WXDIR/deliver
/*.gz
$DISTDIR
219 cp $WXDIR/deliver
/*.bz2
$DISTDIR
220 cp $WXDIR/deliver
/*.
zip $DISTDIR