#!/bin/sh -x
rm -rf schnack
git clone https://github.com/gka/schnack.git schnack
(cd schnack && npm install --ignore-scripts)
version=`grep '"version"' schnack/package.json | sed -e 's;.*: *";;' -e 's;".*;;'`
date=`date '+%Y%m%d'`
tar cvf - --exclude .git schnack | xz -9 >schnack-$version-$date.tar.xz
rm -rf schnack
