Commit | Line | Data |
---|---|---|
33b64e6f JS |
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 | ||
7a5e6267 JS |
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 | ||
10 | expandlines() | |
11 | { | |
12 | toexpand=$1 | |
13 | outputfile=$2 | |
14 | ||
15 | rm -f $outputfile | |
16 | touch $outputfile | |
17 | for line in `cat $toexpand` ; do | |
84c9e2f8 | 18 | if [ "$line" != "" ]; then |
7a5e6267 JS |
19 | ls $line >> $outputfile |
20 | fi | |
8f8edad8 JS |
21 | uniq < $outputfile > /tmp/uniqtemp.txt |
22 | mv /tmp/uniqtemp.txt $outputfile | |
7a5e6267 JS |
23 | done |
24 | } | |
25 | ||
26 | ||
33b64e6f | 27 | init="" |
84c9e2f8 | 28 | if [ "$1" = "" ] |
33b64e6f | 29 | then |
84c9e2f8 | 30 | echo Usage: tardist wx-dir output-dir version |
33b64e6f JS |
31 | exit |
32 | fi | |
33 | ||
84c9e2f8 | 34 | if [ "$2" = "" ] |
33b64e6f | 35 | then |
84c9e2f8 | 36 | echo Usage: tardist wx-dir output-dir version |
33b64e6f JS |
37 | exit |
38 | fi | |
39 | ||
84c9e2f8 JS |
40 | if [ "$3" = "" ] |
41 | then | |
42 | echo Usage: tardist wx-dir output-dir version | |
43 | exit | |
44 | fi | |
45 | ||
46 | WXVER=$3 | |
47 | ||
33b64e6f JS |
48 | echo About to archive wxWindows: |
49 | echo From $1 | |
50 | echo To $2 | |
51 | echo CTRL-C if this is not correct. | |
52 | read dummy | |
53 | ||
54 | cd $1 | |
55 | ||
56 | echo Removing backup files... | |
57 | rm *~ */*~ */*/*~ */*/*/*~ */*/*/*/*~ | |
58 | ||
2c7b88e6 JS |
59 | rm -f $2/wx*-${WXVER}*.tar.gz |
60 | rm -f $2/tex2rtf2-*.tar.gz | |
61 | rm -f $2/dialoged-*.tar.gz | |
62 | rm -f $2/ogl3-*.tar.gz | |
63 | rm -f $2/jpeg-*.tar.gz | |
64 | rm -f $2/tiff-*.tar.gz | |
65 | rm -f $2/stc-*.tar.gz | |
66 | rm -f $2/canvas-*.tar.gz | |
67 | rm -f $2/contrib-*.tar.gz | |
68 | rm -f $2/applet-*.tar.gz | |
69 | rm -f $2/wxxrc-*.tar.gz | |
33b64e6f JS |
70 | |
71 | echo Tarring... | |
72 | ||
b69f1bd1 | 73 | ### Generic |
8f8edad8 JS |
74 | cat $1/distrib/msw/generic.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/makefile.rsp > /tmp/wxgen_in.txt |
75 | expandlines /tmp/wxgen_in.txt /tmp/wxgen.txt | |
84c9e2f8 JS |
76 | tar cvf $2/wxWindows-${WXVER}-gen.tar -T /tmp/wxgen.txt |
77 | gzip $2/wxWindows-${WXVER}-gen.tar | |
78 | mv $2/wxWindows-${WXVER}-gen.tar.gz $2/wxWindows-${WXVER}-gen.tgz | |
b69f1bd1 | 79 | |
33b64e6f | 80 | ### wxGTK |
8f8edad8 JS |
81 | cat $1/distrib/msw/generic.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/xml.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 |
82 | expandlines /tmp/wxgtk_in.txt /tmp/wxgtk.txt | |
d7dcb939 JS |
83 | tar cvf $2/wxGTK-${WXVER}.tar -T /tmp/wxgtk.txt |
84 | gzip $2/wxGTK-${WXVER}.tar | |
33b64e6f JS |
85 | |
86 | ### wxMotif | |
8f8edad8 JS |
87 | cat $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 |
88 | expandlines /tmp/wxmotif_in.txt /tmp/wxmotif.txt | |
da7ed9b7 | 89 | tar cvf $2/wxMotif-${WXVER}.tar -T /tmp/wxmotif.txt |
d7dcb939 | 90 | gzip $2/wxMotif-${WXVER}.tar |
33b64e6f | 91 | |
4869c7db | 92 | ### wxX11: combined wxMotif and wxX11 distributions |
8f8edad8 JS |
93 | cat $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 |
94 | expandlines /tmp/wxx11_in.txt /tmp/wxx11.txt | |
95 | tar cvf $2/wxX11-${WXVER}.tar -T /tmp/wxx11.txt | |
2c7b88e6 | 96 | gzip $2/wxX11-${WXVER}.tar |
c2ff68d3 | 97 | |
13bf613e | 98 | ### wxMSW |
8f8edad8 JS |
99 | # 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 |
100 | # expandlines /tmp/wxmsw_in.txt /tmp/wxmsw.txt | |
4869c7db JS |
101 | # tar cvf $2/wxMSW-${WXVER}.tar -T /tmp/wxmsw.txt |
102 | # gzip $2/wxMSW-${WXVER}.tar | |
13bf613e | 103 | |
38be1092 | 104 | ### wxMac |
8f8edad8 JS |
105 | cat $1/distrib/msw/mac.rsp $1/distrib/msw/cw.rsp $1/distrib/msw/tex2rtf.rsp $1/distrib/msw/dialoged.rsp $1/distrib/msw/ogl.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 |
106 | expandlines /tmp/wxmac_in.txt /tmp/wxmac.txt | |
38be1092 JS |
107 | tar cvf $2/wxMac-${WXVER}.tar -T /tmp/wxmac.txt |
108 | gzip $2/wxMac-${WXVER}.tar | |
109 | ||
33b64e6f | 110 | ### Doc sources |
8f8edad8 JS |
111 | cat $1/distrib/msw/docsrc.rsp > /tmp/docsrc_in.txt |
112 | expandlines /tmp/docsrc_in.txt /tmp/docsrc.txt | |
84c9e2f8 JS |
113 | tar cvf $2/wxWindows-${WXVER}-doc.tar -T /tmp/docsrc.txt |
114 | gzip $2/wxWindows-${WXVER}-doc.tar | |
33b64e6f JS |
115 | |
116 | ### HTML docs | |
8f8edad8 JS |
117 | cat $1/distrib/msw/wx_html.rsp > /tmp/html_in.txt |
118 | expandlines /tmp/html_in.txt /tmp/html.txt | |
84c9e2f8 JS |
119 | tar cvf $2/wxWindows-${WXVER}-htm.tar -T /tmp/html.txt |
120 | gzip $2/wxWindows-${WXVER}-htm.tar | |
33b64e6f JS |
121 | |
122 | ### PDF docs | |
8f8edad8 JS |
123 | cat $1/distrib/msw/wx_pdf.rsp > /tmp/pdf_in.txt |
124 | expandlines /tmp/pdf_in.txt /tmp/pdf.txt | |
84c9e2f8 JS |
125 | tar cvf $2/wxWindows-${WXVER}-pdf.tar -T /tmp/pdf.txt |
126 | gzip $2/wxWindows-${WXVER}-pdf.tar | |
33b64e6f | 127 | |
33b64e6f | 128 | ### Tex2RTF |
8f8edad8 JS |
129 | cat $1/distrib/msw/tex2rtf.rsp > /tmp/tex2rtf_in.txt |
130 | expandlines /tmp/tex2rtf_in.txt /tmp/tex2rtf.txt | |
d7dcb939 JS |
131 | tar cvf $2/tex2rtf2-${WXVER}.tar -T /tmp/tex2rtf.txt |
132 | gzip $2/tex2rtf2-${WXVER}.tar | |
33b64e6f JS |
133 | |
134 | ### OGL | |
8f8edad8 JS |
135 | cat $1/distrib/msw/ogl.rsp > /tmp/ogl_in.txt |
136 | expandlines /tmp/ogl_in.txt /tmp/ogl.txt | |
d7dcb939 JS |
137 | tar cvf $2/ogl3-${WXVER}.tar -T /tmp/ogl.txt |
138 | gzip $2/ogl3-${WXVER}.tar | |
33b64e6f | 139 | |
75737d05 | 140 | ### JPEG |
8f8edad8 JS |
141 | cat $1/distrib/msw/jpeg.rsp > /tmp/jpeg_in.txt |
142 | expandlines /tmp/jpeg_in.txt /tmp/wxx11.txt | |
d7dcb939 JS |
143 | tar cvf $2/jpeg-${WXVER}.tar -T /tmp/jpeg.txt |
144 | gzip $2/jpeg-${WXVER}.tar | |
75737d05 | 145 | |
f6bcfd97 | 146 | ### TIFF |
8f8edad8 JS |
147 | cat $1/distrib/msw/tiff.rsp > /tmp/tiff_in.txt |
148 | expandlines /tmp/tiff_in.txt /tmp/tiff.txt | |
d7dcb939 JS |
149 | tar cvf $2/tiff-${WXVER}.tar -T /tmp/tiff.txt |
150 | gzip $2/tiff-${WXVER}.tar | |
2c7b88e6 JS |
151 | |
152 | # Copy readme and other files | |
4869c7db JS |
153 | cp $1/docs/readme.txt $2/readme-${WXVER}.txt |
154 | cp $1/docs/changes.txt $2/changes-${WXVER}.txt | |
155 | cp $1/docs/mgl/readme.txt $2/readme_mgl-${WXVER}.txt | |
156 | cp $1/docs/mgl/install.txt $2/install_mgl-${WXVER}.txt | |
157 | cp $1/docs/x11/readme.txt $2/readme_x11-${WXVER}.txt | |
158 | cp $1/docs/x11/readme-nanox.txt $2/readme_nanox-${WXVER}.txt | |
159 | cp $1/docs/x11/install.txt $2/install_x11-${WXVER}.txt | |
160 | cp $1/docs/motif/readme.txt $2/readme_motif-${WXVER}.txt | |
161 | cp $1/docs/motif/install.txt $2/install_motif-${WXVER}.txt | |
162 | cp $1/docs/msw/readme.txt $2/readme_msw-${WXVER}.txt | |
163 | cp $1/docs/msw/install.txt $2/install_msw-${WXVER}.txt | |
164 | cp $1/docs/gtk/readme.txt $2/readme_gtk-${WXVER}.txt | |
165 | cp $1/docs/gtk/install.txt $2/install_gtk-${WXVER}.txt | |
166 | cp $1/docs/mac/readme.txt $2/readme_mac-${WXVER}.txt | |
167 | cp $1/docs/mac/install.txt $2/install_mac-${WXVER}.txt | |
f6bcfd97 | 168 | |
33b64e6f | 169 | echo Done! |