#!/bin/sh

# more-or-less private use only. 'naptime' is a local script that publishes
# stuff to my web server at naptime.net.

TMP=${TMP:-/tmp}
PROJECT="$1"
VERSION="$( git log --date='format:%Y%m%d' --pretty=format:%ad_%h | head -1 )"

rm -rf $TMP/$PROJECT-$VERSION
mkdir -p $TMP/$PROJECT-$VERSION
cp -a * $TMP/$PROJECT-$VERSION
cd $TMP
tar cvfz $PROJECT-$VERSION.tar.gz $PROJECT-$VERSION
naptime $PROJECT-$VERSION.tar.gz
md5sum $PROJECT-$VERSION.tar.gz
