#!/usr/bin/env bash set -e hoster=${LN_GO_HOSTER:-github.com} username=${LN_GO_USERNAME:-wndhydrnt} if [ -z $1 ]; then echo "" echo "Usage: ln-go REPOSITORY [PATH]" exit 1 fi if [ -z $2 ]; then src_path=$PWD else src_path=$2 fi go_src_path=$GOPATH/src/$hoster/$username/$1 echo "Linking $src_path to $go_src_path" ln -s $src_path $go_src_path