-#gzip $2/wxWindows-${WXVER}-tiff.tar
-
-# Copy readme and other files
-cd $1
-cp $1/docs/readme.txt $2/readme-${WXVER}.txt
-cp $1/docs/changes.txt $2/changes-${WXVER}.txt
-cp $1/docs/mgl/readme.txt $2/readme-mgl-${WXVER}.txt
-cp $1/docs/mgl/install.txt $2/install-mgl-${WXVER}.txt
-cp $1/docs/x11/readme.txt $2/readme-x11-${WXVER}.txt
-cp $1/docs/x11/readme-nanox.txt $2/readme-nanox-${WXVER}.txt
-cp $1/docs/x11/install.txt $2/install-x11-${WXVER}.txt
-cp $1/docs/motif/readme.txt $2/readme-motif-${WXVER}.txt
-cp $1/docs/motif/install.txt $2/install-motif-${WXVER}.txt
-cp $1/docs/msw/readme.txt $2/readme-msw-${WXVER}.txt
-cp $1/docs/msw/install.txt $2/install-msw-${WXVER}.txt
-cp $1/docs/gtk/readme.txt $2/readme-gtk-${WXVER}.txt
-cp $1/docs/gtk/install.txt $2/install-gtk-${WXVER}.txt
-cp $1/docs/mac/readme.txt $2/readme-mac-${WXVER}.txt
-cp $1/docs/mac/install.txt $2/install-mac-${WXVER}.txt
-cp $1/docs/os2/install.txt $2/install-os2-${WXVER}.txt
-
-echo Done!
+#gzip $WXDEST/wxWindows-${WXVER}-tiff.tar
+
+init=""
+if [ "$1" = "" ]
+then
+ echo Usage: tardist wx-dir output-dir version
+ exit
+fi
+
+if [ "$2" = "" ]
+then
+ echo Usage: tardist wx-dir output-dir version
+ exit
+fi
+
+if [ "$3" = "" ]
+then
+ echo Usage: tardist wx-dir output-dir version
+ exit
+fi
+
+PROGNAME=$0
+WXSRC=$1
+WXDEST=$2
+WXVER=$3
+
+SPINWXALL=0
+SPINWXX11=0
+SPINWXGTK=0
+SPINWXMOTIF=0
+SPINWXMAC=0
+SPINWXDOCS=0
+SPINEVERYTHING=0
+
+usage()
+{
+ echo Usage: $PROGNAME "src-dir dest-dir version-number [ options ]"
+ echo Options:
+ echo " --help Display this help message"
+ echo " --wxall Spin wxAll"
+ echo " --wxgtk Spin wxGTK"
+ echo " --wxmotif Spin wxMotif"
+ echo " --wxmac Spin wxMac"
+ echo " --wxx11 Spin wxX11"
+ echo " --wxdocs Spin docs"
+ echo " --all Spin EVERYTHING"
+
+ exit 1
+}
+
+# Process command line options.
+shift 3
+for i in "$@"; do
+ case "$i" in
+ --wxall) SPINWXALL=1 ;;
+ --wxx11) SPINWXX11=1 ;;
+ --wxgtk) SPINWXGTK=1 ;;
+ --wxmotif) SPINWXMOTIF=1 ;;
+ --wxmac) SPINWXMAC=1 ;;
+ --wxdocs) SPINWXDOCS=1 ;;
+ --all) SPINEVERYTHING=1 ;;
+ *)
+ usage
+ exit
+ ;;
+ esac
+done
+
+echo About to archive wxWindows:
+echo From $WXSRC
+echo To $WXDEST
+echo Version $WXVER
+echo CTRL-C if this is not correct.
+read dummy
+
+doinit
+
+if [ "$SPINWXX11" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
+ dospinwxx11
+fi
+
+if [ "$SPINWXGTK" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
+ dospinwxgtk
+fi
+
+if [ "$SPINWXMAC" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
+ dospinwxmac
+fi
+
+if [ "$SPINWXMOTIF" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
+ dospinwxmotif
+fi
+
+if [ "$SPINWXDOCS" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
+ dospinwxdocs
+fi
+
+if [ "$SPINWXALL" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then
+ dospinwxall
+fi
+
+