30 lines
689 B
Bash
30 lines
689 B
Bash
## Description: Bash configuration for the Go setup
|
|
## vim: ft=sh :
|
|
|
|
if [ -f "${HOME}/.local/software/go/bin/go" ]; then
|
|
export GOPATH=${XDG_DATA_HOME}/go
|
|
export GOROOT=${HOME}/.local/software/go
|
|
export GOBIN=${HOME}/.local/goblin
|
|
|
|
if ! [[ "${PATH}" =~ "${GOBIN}" ]]; then
|
|
export PATH=${GOBIN}:${PATH}
|
|
fi
|
|
|
|
if ! [ -d "${GOPATH}" ]; then
|
|
mkdir ${GOPATH}
|
|
fi
|
|
|
|
if ! [ -d "${GOBIN}" ]; then
|
|
mkdir ${GOBIN}
|
|
fi
|
|
|
|
export GOOS=linux
|
|
export GOARCH=amd64
|
|
export CGO_ENABLED=0
|
|
fi
|
|
|
|
# Magefile stuff
|
|
if [ -x "$( command -v mage )" ]; then
|
|
export MAGEFILE_CACHE=${XDG_CACHE_HOME}/magefile
|
|
export MAGEFILE_ENABLE_COLOR=true
|
|
fi
|