#!/bin/bash


# I've made this shell script for myself so I could quickly and
# easily make source distributions of webcpp.


if [ "$1" = "" ]; then
 echo "You must supply the name of the source distribution."
 echo "Example: $ ./mksrcdist 0.1.1"
 exit 0
fi

NAME="webcpp-$1-src"

make distclean

cd ..
mkdir -p $NAME
cp -R -d ./webcpp/* $NAME
tar -czvf $NAME.tar.gz $NAME
rm -rf $NAME
cd ./webcpp

echo "Source distribution $NAME has been made."
