#!/bin/sh

# Probably because these files have an underscore in their name
# the --exclude option is not working! strange thing
cd webtree/dlg
rm -f [mt]dlg_*.cpp
cd ../..

DISTDATE=`date +%y%m%d`
ARCNAME="webtree-$DISTDATE.src.tar.gz"

tar --create --gzip --verbose --file $ARCNAME \
--exclude *.o --exclude m*.cpp --exclude CVS --exclude kwebtree \
--exclude *~ --exclude .deps --exclude *.tar.gz --directory .. webtree


# Generation of the binary distribution only works if webtree
# is already installed.
BINNAME="webtree-$DISTDATE.i386.tar.gz"
ARCDIR=`pwd`
FBNAME=$ARCDIR/$BINNAME

cd $KDEDIR
pwd
tar --create --gzip --verbose --file $FBNAME \
bin/kwebtree \
share/doc/HTML/en/kwebtree/* \
share/apps/kwebtree/* \
share/applnk/Internet/WebTree.kdelnk \
share/mimelnk/application/x-webtree.kdelnk \
share/icons/kwebtree.xpm \
share/icons/wtfile.xpm \
share/locale/??/LC_MESSAGES/kwebtree.mo
cd $ARCDIR

