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