#!/bin/sh -x
rm -f package*
rm -rf node_modules
npm install mocha
version=`grep '"version":' node_modules/mocha/package.json | head -1 | sed -e 's;.*: *";;' -e 's;".*;;'`
date=`date '+%Y%m%d'`
tar cvf - node_modules | gzip -9 >mocha-$version-$date.tar.gz
rm -rf node_modules
