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