]> git.saurik.com Git - wxWidgets.git/blame_incremental - distrib/msw/tardist
%s to %ls conversion
[wxWidgets.git] / distrib / msw / tardist
... / ...
CommitLineData
1#!/bin/sh
2# tardist: make up a tar.gz distribution of wxWindows 2
3# Supply a source (e.g. ~/wx2) and destination (e.g. ~/wx2/deliver)
4
5# We can't use e.g. this:
6# ls `cat $SRC/distrib/msw/makefile.rsp` zip -@ -u $DEST/wxWindows-$VERSION-gen.zip
7# because there's not enough space on the command line, plus we need to ignore the
8# blank lines.
9
10TAR=tar
11ARCH=`arch`
12if [ "$ARCH" = "ppc" ]; then
13 TAR=gnutar
14fi
15
16expandlines()
17{
18 toexpand=$1
19 outputfile=$2
20
21 rm -f $outputfile
22 touch $outputfile
23 for line in `cat $toexpand` ; do
24 if [ "$line" != "" ]; then
25 ls $line >> $outputfile
26 fi
27 uniq < $outputfile > /tmp/uniqtemp.txt
28 mv /tmp/uniqtemp.txt $outputfile
29 done
30}
31
32
33init=""
34if [ "$1" = "" ]
35then
36 echo Usage: tardist wx-dir output-dir version
37 exit
38fi
39
40if [ "$2" = "" ]
41then
42 echo Usage: tardist wx-dir output-dir version
43 exit
44fi
45
46if [ "$3" = "" ]
47then
48 echo Usage: tardist wx-dir output-dir version
49 exit
50fi
51
52WXVER=$3
53
54echo About to archive wxWindows:
55echo From $1
56echo To $2
57echo CTRL-C if this is not correct.
58read dummy
59
60cd $1
61
62echo Removing backup files...
63rm *~ */*~ */*/*~ */*/*/*~ */*/*/*/*~
64
65rm -f $2/wx*-${WXVER}*.tar.gz
66rm -f $2/tex2rtf2-*.tar.gz
67rm -f $2/dialoged-*.tar.gz
68rm -f $2/ogl3-*.tar.gz
69rm -f $2/jpeg-*.tar.gz
70rm -f $2/tiff-*.tar.gz
71rm -f $2/stc-*.tar.gz
72rm -f $2/canvas-*.tar.gz
73rm -f $2/contrib-*.tar.gz
74rm -f $2/applet-*.tar.gz
75rm -f $2/wxxrc-*.tar.gz
76
77echo Tarring...
78
79### Generic
80cat $1/distrib/msw/generic.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/makefile.rsp > /tmp/wxgen_in.txt
81expandlines /tmp/wxgen_in.txt /tmp/wxgen.txt
82$TAR cf $2/wxWindows-${WXVER}-gen.tar -T /tmp/wxgen.txt
83gzip $2/wxWindows-${WXVER}-gen.tar
84mv $2/wxWindows-${WXVER}-gen.tar.gz $2/wxWindows-${WXVER}-gen.tgz
85
86### wxGTK
87cat $1/distrib/msw/generic.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/tex2rtf.rsp $1/distrib/msw/dialoged.rsp $1/distrib/msw/gtk.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxgtk_in.txt
88expandlines /tmp/wxgtk_in.txt /tmp/wxgtk.txt
89$TAR cf $2/wxGTK-${WXVER}.tar -T /tmp/wxgtk.txt
90
91echo Re-tarring wxGTK in a subdirectory...
92cd $2
93mkdir wxWindows-${WXVER}
94cd wxWindows-${WXVER}
95$TAR xf ../wxGTK-${WXVER}.tar
96cd ..
97rm -f wxGTK-${WXVER}.tar
98$TAR cf $2/wxGTK-${WXVER}.tar wxWindows-${WXVER}/*
99rm -f -r wxWindows-${WXVER}
100gzip $2/wxGTK-${WXVER}.tar
101
102### wxMotif
103cat $1/distrib/msw/generic.rsp $1/distrib/msw/motif.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxmotif_in.txt
104expandlines /tmp/wxmotif_in.txt /tmp/wxmotif.txt
105$TAR cf $2/wxMotif-${WXVER}.tar -T /tmp/wxmotif.txt
106
107echo Re-tarring wxMotif in a subdirectory...
108cd $2
109mkdir wxWindows-${WXVER}
110cd wxWindows-${WXVER}
111$TAR xf ../wxMotif-${WXVER}.tar
112cd ..
113rm -f wxMotif-${WXVER}.tar
114$TAR cf $2/wxMotif-${WXVER}.tar wxWindows-${WXVER}/*
115rm -f -r wxWindows-${WXVER}
116gzip $2/wxMotif-${WXVER}.tar
117
118### wxX11: combined wxMotif and wxX11 distributions
119cat $1/distrib/msw/generic.rsp $1/distrib/msw/motif.rsp $1/distrib/msw/x11.rsp $1/distrib/msw/univ.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/dialoged.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxx11_in.txt
120expandlines /tmp/wxx11_in.txt /tmp/wxx11.txt
121$TAR cf $2/wxX11-${WXVER}.tar -T /tmp/wxx11.txt
122
123echo Re-tarring wxX11 in a subdirectory...
124cd $2
125mkdir wxWindows-${WXVER}
126cd wxWindows-${WXVER}
127$TAR xf ../wxX11-${WXVER}.tar
128cd ..
129rm -f wxX11-${WXVER}.tar
130$TAR cf $2/wxX11-${WXVER}.tar wxWindows-${WXVER}/*
131rm -f -r wxWindows-${WXVER}
132gzip $2/wxX11-${WXVER}.tar
133
134### wxMSW
135# cat $1/distrib/msw/msw.rsp $1/distrib/msw/vc.rsp $1/distrib/msw/bc.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxmsw_in.txt
136# expandlines /tmp/wxmsw_in.txt /tmp/wxmsw.txt
137# $TAR cf $2/wxMSW-${WXVER}.tar -T /tmp/wxmsw.txt
138# gzip $2/wxMSW-${WXVER}.tar
139
140### wxMac
141cat $1/distrib/msw/mac.rsp $1/distrib/msw/generic.rsp $1/distrib/msw/cw.rsp $1/distrib/msw/tex2rtf.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/dialoged.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/stc.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxmac_in.txt
142expandlines /tmp/wxmac_in.txt /tmp/wxmac.txt
143$TAR cf $2/wxMac-${WXVER}.tar -T /tmp/wxmac.txt
144
145echo Re-tarring wxMac in a subdirectory...
146cd $2
147mkdir wxWindows-${WXVER}
148cd wxWindows-${WXVER}
149$TAR xf ../wxMac-${WXVER}.tar
150cd ..
151rm -f wxMac-${WXVER}.tar
152$TAR cf $2/wxMac-${WXVER}.tar wxWindows-${WXVER}/*
153rm -f -r wxWindows-${WXVER}
154gzip $2/wxMac-${WXVER}.tar
155
156### Doc sources
157cat $1/distrib/msw/docsrc.rsp > /tmp/docsrc_in.txt
158expandlines /tmp/docsrc_in.txt /tmp/docsrc.txt
159$TAR cf $2/wxWindows-${WXVER}-doc.tar -T /tmp/docsrc.txt
160
161echo Re-tarring docs in a subdirectory...
162cd $2
163mkdir wxWindows-${WXVER}
164cd wxWindows-${WXVER}
165$TAR xf ../wxWindows-${WXVER}-doc.tar
166cd ..
167rm -f wxWindows-${WXVER}-doc.tar
168$TAR cf $2/wxWindows-${WXVER}-doc.tar wxWindows-${WXVER}/*
169rm -f -r wxWindows-${WXVER}
170gzip $2/wxWindows-${WXVER}-doc.tar
171
172### HTML docs
173cat $1/distrib/msw/wx_html.rsp > /tmp/html_in.txt
174expandlines /tmp/html_in.txt /tmp/html.txt
175$TAR cf $2/wxWindows-${WXVER}-html.tar -T /tmp/html.txt
176
177echo Re-tarring HTML in a subdirectory...
178cd $2
179mkdir wxWindows-${WXVER}
180cd wxWindows-${WXVER}
181$TAR xf ../wxWindows-${WXVER}-html.tar
182cd ..
183rm -f wxWindows-${WXVER}-html.tar
184$TAR cf $2/wxWindows-${WXVER}-html.tar wxWindows-${WXVER}/*
185rm -f -r wxWindows-${WXVER}
186gzip $2/wxWindows-${WXVER}-html.tar
187
188### PDF docs
189cat $1/distrib/msw/wx_pdf.rsp > /tmp/pdf_in.txt
190expandlines /tmp/pdf_in.txt /tmp/pdf.txt
191$TAR cf $2/wxWindows-${WXVER}-pdf.tar -T /tmp/pdf.txt
192
193echo Re-tarring PDF in a subdirectory...
194cd $2
195mkdir wxWindows-${WXVER}
196cd wxWindows-${WXVER}
197$TAR xf ../wxWindows-${WXVER}-pdf.tar
198cd ..
199rm -f wxWindows-${WXVER}-pdf.tar
200$TAR cf $2/wxWindows-${WXVER}-pdf.tar wxWindows-${WXVER}/*
201rm -f -r wxWindows-${WXVER}
202gzip $2/wxWindows-${WXVER}-pdf.tar
203
204### Tex2RTF
205cat $1/distrib/msw/tex2rtf.rsp > /tmp/tex2rtf_in.txt
206expandlines /tmp/tex2rtf_in.txt /tmp/tex2rtf.txt
207$TAR cf $2/wxWindows-${WXVER}-tex2rtf.tar -T /tmp/tex2rtf.txt
208
209echo Re-tarring Tex2RTF in a subdirectory...
210cd $2
211mkdir wxWindows-${WXVER}
212cd wxWindows-${WXVER}
213$TAR xf ../wxWindows-${WXVER}-tex2rtf.tar
214cd ..
215rm -f wxWindows-${WXVER}-tex2rtf.tar
216$TAR cf $2/wxWindows-${WXVER}-tex2rtf.tar wxWindows-${WXVER}/*
217rm -f -r wxWindows-${WXVER}
218gzip $2/wxWindows-${WXVER}-tex2rtf.tar
219
220### OGL
221cat $1/distrib/msw/ogl.rsp > /tmp/ogl_in.txt
222expandlines /tmp/ogl_in.txt /tmp/ogl.txt
223$TAR cf $2/wxWindows-${WXVER}-ogl.tar -T /tmp/ogl.txt
224
225echo Re-tarring OGL in a subdirectory...
226cd $2
227mkdir wxWindows-${WXVER}
228cd wxWindows-${WXVER}
229$TAR xf ../wxWindows-${WXVER}-ogl.tar
230cd ..
231rm -f wxWindows-${WXVER}-ogl.tar
232$TAR cf $2/wxWindows-${WXVER}-ogl.tar wxWindows-${WXVER}/*
233rm -f -r wxWindows-${WXVER}
234gzip $2/wxWindows-${WXVER}-ogl.tar
235
236### JPEG
237cat $1/distrib/msw/jpeg.rsp > /tmp/jpeg_in.txt
238expandlines /tmp/jpeg_in.txt /tmp/wxx11.txt
239$TAR cf $2/wxWindows-${WXVER}-jpeg.tar -T /tmp/jpeg.txt
240
241echo Re-tarring docs in a subdirectory...
242cd $2
243mkdir wxWindows-${WXVER}
244cd wxWindows-${WXVER}
245$TAR xf ../wxWindows-${WXVER}-jpeg.tar
246cd ..
247rm -f wxWindows-${WXVER}-jpeg.tar
248$TAR cf $2/wxWindows-${WXVER}-jpeg.tar wxWindows-${WXVER}/*
249rm -f -r wxWindows-${WXVER}
250gzip $2/wxWindows-${WXVER}-jpeg.tar
251
252### TIFF
253cat $1/distrib/msw/tiff.rsp > /tmp/tiff_in.txt
254expandlines /tmp/tiff_in.txt /tmp/tiff.txt
255$TAR cf $2/wxWindows-${WXVER}-tiff.tar -T /tmp/tiff.txt
256
257echo Re-tarring docs in a subdirectory...
258cd $2
259mkdir wxWindows-${WXVER}
260cd wxWindows-${WXVER}
261$TAR xf ../wxWindows-${WXVER}-tiff.tar
262cd ..
263rm -f wxWindows-${WXVER}-tiff.tar
264$TAR cf $2/wxWindows-${WXVER}-tiff.tar wxWindows-${WXVER}/*
265rm -f -r wxWindows-${WXVER}
266gzip $2/wxWindows-${WXVER}-tiff.tar
267
268# Copy readme and other files
269cp $1/docs/readme.txt $2/readme-${WXVER}.txt
270cp $1/docs/changes.txt $2/changes-${WXVER}.txt
271cp $1/docs/mgl/readme.txt $2/readme-mgl-${WXVER}.txt
272cp $1/docs/mgl/install.txt $2/install-mgl-${WXVER}.txt
273cp $1/docs/x11/readme.txt $2/readme-x11-${WXVER}.txt
274cp $1/docs/x11/readme-nanox.txt $2/readme-nanox-${WXVER}.txt
275cp $1/docs/x11/install.txt $2/install-x11-${WXVER}.txt
276cp $1/docs/motif/readme.txt $2/readme-motif-${WXVER}.txt
277cp $1/docs/motif/install.txt $2/install-motif-${WXVER}.txt
278cp $1/docs/msw/readme.txt $2/readme-msw-${WXVER}.txt
279cp $1/docs/msw/install.txt $2/install-msw-${WXVER}.txt
280cp $1/docs/gtk/readme.txt $2/readme-gtk-${WXVER}.txt
281cp $1/docs/gtk/install.txt $2/install-gtk-${WXVER}.txt
282cp $1/docs/mac/readme.txt $2/readme-mac-${WXVER}.txt
283cp $1/docs/mac/install.txt $2/install-mac-${WXVER}.txt
284cp $1/docs/os2/install.txt $2/install-os2-${WXVER}.txt
285
286echo Done!