#! /bin/sh
rmflags=-i

if [ ! -e ./dist ]
 then
   echo 'You must be in the base directory'
   exit 1
fi

current_dir=`pwd`
dir=`basename $current_dir`
find . -name "*~" -exec rm $rmflags \{\} \;
#find . -name "*.[aos]" -exec rm $rmflags \{\} \;
cd ..
echo -n I am now in
pwd
echo tar zcvf $dir.tgz $dir
tar zcvf $dir.tgz $dir
