#!/bin/bash git clone git://github.com/OpenKinect/libfreenect pushd libfreenect git checkout $1 sh mkcontrib.sh find ./ -name ".git*" -exec rm -rf {} ';' rm -rf platform/windows platform/osx popd tar cjf libfreenect-$1.tar.bz2 libfreenect