#!/bin/sh

filename=sub`date +%d.%H.%M`.tar
if (let "$# == 0") then
echo "Do not run this script directly!  Instead, run 'make tar'."
exit
fi
mkdir .tar_temp
cp readme .tar_temp
cp stub-runme .tar_temp/runme
mkdir .tar_temp/support
cp runme .tar_temp/support
cp pousse_[0-9] pousse_[12][0-9] .tar_temp/support
mkdir .tar_temp/src
cp $* .tar_temp/src
cd .tar_temp
echo "tar'ing..."
tar cvf ../$filename readme runme support src
chmod 755 runme
cd ..
echo "gzip'ing..."
gzip $filename
rm -rf .tar_temp
echo "done"