Files

25 lines
383 B
Bash
Raw Permalink Normal View History

2019-07-01 11:03:07 -07:00
#! /usr/bin/env bash
# Copyright (c) HashiCorp, Inc.
2023-08-10 15:53:29 -07:00
# SPDX-License-Identifier: BUSL-1.1
2019-07-01 11:03:07 -07:00
set -eu -o pipefail
gpath=${GOPATH:-}
if [ -z "$gpath" ]; then
gpath=$HOME/go
fi
reldir=`dirname $0`
curdir=`pwd`
cd $reldir
CUR_GO_DIR=`pwd`
cd $curdir
if [[ $CUR_GO_DIR == *"$gpath"* ]]; then
# echo "You're on the gopath"
exit 1
else
# echo "You're not on the gopath"
exit 0
fi