#!/bin/sh
rm -rf md2man
mkdir md2man
export GOPATH=`pwd`/md2man
mkdir -p $GOPATH/src/github.com/cpuguy83/go-md2man
git clone --depth 1 http://github.com/cpuguy83/go-md2man.git $GOPATH/src/github.com/cpuguy83/go-md2man
( cd $GOPATH/src/github.com/cpuguy83/go-md2man
  go get -v -d
)
tar cf - --exclude .git --exclude .hg --exclude .svn md2man | xz -9 >md2man-`date '+%Y%m%d'`.tar.xz
rm -rf md2man
