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