set -e
echo $0 $1 $2
if [ $0 == "/bin/bash" ]
then
	export GOPATH=`cd $(dirname "goget.sh") && cd ../../ && pwd`
	echo "GOPATH HAS BEEN SET: "${GOPATH}
	return 0
fi
export GOPATH=`cd $(dirname $0) && cd ../../ && pwd`
case $1 in
	i)
	echo "Will intall package: "$2
	glide get $2

	;;

	u)
	echo "Will update package"
	glide update

	;;
	gopath)
	go env

	;;
	*)
	echo "Install: $0 i github.com/mattn/go-sqlite3"
	echo "Update: $0 u"
	echo "gopath: $0 gopath"
	echo "Just set gopath: source $0"

	;;
esac
