3 # Make a distribution of ConfigTool for Linux
4 # Usage: maketarball.sh wxconfigtool-dir bin-dir deliver-dir version [ options ]
5 # For example: maketarball.sh ~/wxconfigtool /tmp/build-wxconfigtool /tmp/wxconfigtool-deliver 1.40
15 # Set this to the required version
20 rm -f -r $DEST/wxconfigtool
*
21 rm -f $DEST/wxconfigtool
-*.
*
23 mkdir -p $DEST/wxconfigtool
-$VERSION
24 mkdir -p $DEST/wxconfigtool
-$VERSION/resources
25 mkdir -p $DEST/wxconfigtool
-$VERSION/Sample
26 cd $DEST/wxconfigtool
-$VERSION
29 cp $APPDIR/docs
/readme.txt readme.txt
30 cp $APPDIR/docs
/license.txt .
32 # Copy the application binary
33 cp $BINARYSRC/wxconfigtool .
35 # Copy the wxHTML Help manual file
36 cp $APPDIR/manual
/configtool.htb .
39 cp -r $APPDIR/sample Sample
40 cp $APPDIR/resources
/* resources
42 echo Removing junk from the samples folder...
45 # Copy the resources file
47 zip configtool.bin
-j resources
/*
51 # Remove any debug info from wxconfigtool
54 # Maybe compress the binary
55 if [ "$UPX" != "0" ]; then
61 # Make .tar.gz and .tar.bz2 archives
62 tar cvf
$DEST/wxconfigtool
-$VERSION-i386.
tar wxconfigtool
-$VERSION/*
63 gzip -c $DEST/wxconfigtool
-$VERSION-i386.
tar > $DEST/wxconfigtool
-$VERSION-i386.
tar.gz
64 bzip2 -c $DEST/wxconfigtool
-$VERSION-i386.
tar > $DEST/wxconfigtool
-$VERSION-i386.
tar.bz2
74 echo Usage
: $PROGNAME "cvs-dir bin-dir deliver-dir version-number [ options ]"
76 echo " --help Display this help message"
77 echo " --upx Compress executable with UPX"
78 echo " --build Invoke 'maketarball.sh release full' first"
79 echo For example
: maketarball.sh ~
/wxconfigtool
/tmp
/build
-app /tmp
/wxconfigtool
-deliver 1.20
83 # Process command line options.
96 if [ ! -d "$DEST" ]; then
100 if [ ! -d "$SRC" ]; then
101 echo Source directory
$SRC not found.
106 if [ ! -d "$BINARYSRC" ]; then
107 echo Location of wxconfigtool binary
$BINARYSRC not found.
112 if [ "$VERSION" = "" ]; then
113 echo Pass the version number as the fourth argument.
118 echo Creating Version
$VERSION distribution
in $DEST, using
source directory
$SRC and wxconfigtool binary
in $BINARYSRC.
119 #echo Press return to continue.
122 # Remove all existing files
123 if [ ! -d "$DEST/wxconfigtool" ]; then
124 rm -f -r $DEST/wxconfigtool
127 # Skip INNO setup if INNO is 0.
128 if [ "$BUILD" = "1" ]; then
134 echo ConfigTool archived.