3 # Make a distribution of Tex2RTF for Unix
4 # Julian Smart 2002-08-07
5 # Usage: maketarball.sh wx-dir bin-file deliver-dir version-no [ options ]
6 # For example: maketarball.sh ~/wx2dev/wxWindows /bin/tex2rtf /tmp/tex2rtf-deliver
8 # wx-dir is the wxWindows source tree
9 # bin-file is the Tex2RTF binary, already compiled
10 # deliver-dir is the directory the distribution will be put in
11 # version-no is the version, e.g. 2.01
13 TEX2RTFDIR
=$1/utils
/tex2rtf
24 # Make the documentation first
28 rm -f -r $DEST/tex2rtf
-*.
*
30 mkdir -p $DEST/tex2rtf
-$VERSION
31 mkdir -p $DEST/tex2rtf
-$VERSION/tools
32 mkdir -p $DEST/tex2rtf
-$VERSION/docs
33 mkdir -p $DEST/tex2rtf
-$VERSION/html
35 # Make the source archive
37 ls `cat $TEX2RTFDIR/distrib/src.rsp` > /tmp
/tex2rtf.txt
38 tar cvf
$DEST/tex2rtf
-$VERSION/tex2rtf
-$VERSION-source.
tar -T /tmp
/tex2rtf.txt
39 gzip $DEST/tex2rtf
-$VERSION/tex2rtf
-$VERSION-source.
tar
42 cd $DEST/tex2rtf
-$VERSION
44 # Copy the binary and other files
46 cp $TEX2RTFDIR/docs
/readme.txt readme.txt
47 cp $TEX2RTFDIR/docs
/licence.txt .
48 cp $TEX2RTFDIR/docs
/gpl.txt .
49 cp $TEX2RTFDIR/docs
/lgpl.txt .
50 cp $TEX2RTFDIR/docs
/*.html
$TEX2RTFDIR/docs
/*.gif html
51 cp $TEX2RTFDIR/docs
/tex2rtf.htb .
53 # Copy all the doc sources, so that the user can experiment
55 cp $TEX2RTFDIR/docs
/*.tex
$TEX2RTFDIR/docs
/*.ini
$TEX2RTFDIR/docs
/*.sty
$TEX2RTFDIR/docs
/*.bib
$TEX2RTFDIR/docs
/*.gif
$TEX2RTFDIR/docs
/*.tex docs
59 if [ "$UPX" != "0" ]; then
65 tar cvf
$DEST/tex2rtf
-$VERSION-i386.
tar tex2rtf
-$VERSION/*
66 gzip -c $DEST/tex2rtf
-$VERSION-i386.
tar > $DEST/tex2rtf
-$VERSION-i386.
tar.gz
67 bzip2 -c $DEST/tex2rtf
-$VERSION-i386.
tar > $DEST/tex2rtf
-$VERSION-i386.
tar.bz2
72 echo Usage
: $PROGNAME "wx-dir bin-file deliver-dir version-no [ options ]"
74 echo " --help Display this help message"
75 echo " --upx Compress executable with UPX"
76 echo For example
: $PROGNAME ~
/wx
2dev
/wxWindows
/tmp
/tex2rtf
/tmp
/tex2rtf
-deliver 2.0
80 # Process command line options.
92 if [ ! -d "$DEST" ]; then
96 if [ ! -d "$SRC" ]; then
97 echo Source directory
$SRC not found.
102 if [ ! -f "$BINARYSRC" ]; then
103 echo tex2rtf binary
$BINARYSRC not found.
108 if [ "$VERSION" = "" ]; then
109 echo Pass the version number as the fourth argument.
114 echo Creating Version
$VERSION distribution
in $DEST, using
source directory
$SRC and tex2rtf binary
$BINARYSRC.
118 echo Tex2RTF archived.