]>
Commit | Line | Data |
---|---|---|
332b8edb JS |
1 | #!/bin/sh |
2 | # tarwxmac: make up a tar.gz distribution of wxMac | |
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 | ||
10 | TAR=tar | |
11 | ARCH=`arch` | |
12 | if [ "$ARCH" = "ppc" ]; then | |
13 | TAR=gnutar | |
14 | fi | |
15 | ||
16 | expandlines() | |
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 | ||
33 | init="" | |
34 | if [ "$1" = "" ] | |
35 | then | |
36 | echo Usage: tardist wx-dir output-dir version | |
37 | exit | |
38 | fi | |
39 | ||
40 | if [ "$2" = "" ] | |
41 | then | |
42 | echo Usage: tardist wx-dir output-dir version | |
43 | exit | |
44 | fi | |
45 | ||
46 | if [ "$3" = "" ] | |
47 | then | |
48 | echo Usage: tardist wx-dir output-dir version | |
49 | exit | |
50 | fi | |
51 | ||
52 | WXVER=$3 | |
53 | ||
54 | echo About to archive wxMac: | |
55 | echo From $1 | |
56 | echo To $2 | |
57 | echo CTRL-C if this is not correct. | |
58 | read dummy | |
59 | ||
60 | cd $1 | |
61 | ||
62 | echo Removing backup files... | |
63 | rm *~ */*~ */*/*~ */*/*/*~ */*/*/*/*~ | |
64 | ||
65 | rm -f $2/wxMac-${WXVER}*.tar.gz | |
66 | rm -f -r $2/wxMac-${WXVER} | |
67 | ||
68 | echo Tarring... | |
69 | ||
70 | ### wxMac | |
dba860d9 | 71 | cat $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 |
332b8edb JS |
72 | expandlines /tmp/wxmac_in.txt /tmp/wxmac.txt |
73 | $TAR cf $2/wxMac-${WXVER}.tar -T /tmp/wxmac.txt | |
74 | ||
75 | echo Re-tarring in a subdirectory... | |
76 | cd $2 | |
77 | mkdir wxWindows-${WXVER} | |
78 | cd wxWindows-${WXVER} | |
79 | $TAR xf ../wxMac-${WXVER}.tar | |
80 | cd .. | |
81 | rm -f wxMac-${WXVER}.tar | |
82 | ||
83 | $TAR cf $2/wxMac-${WXVER}.tar wxWindows-${WXVER}/* | |
84 | rm -f -r wxWindows-${WXVER} | |
85 | gzip $2/wxMac-${WXVER}.tar | |
86 | ||
87 | # Copy readme and other files | |
88 | cp $1/docs/readme.txt $2/readme-${WXVER}.txt | |
89 | cp $1/docs/changes.txt $2/changes-${WXVER}.txt | |
90 | cp $1/docs/mac/readme.txt $2/readme-mac-${WXVER}.txt | |
91 | cp $1/docs/mac/install.txt $2/install-mac-${WXVER}.txt | |
92 | ||
93 | echo Done! |