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