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