mirror of
https://github.com/hashicorp/packer.git
synced 2026-02-03 20:39:29 -05:00
25 lines
No EOL
384 B
Bash
Executable file
25 lines
No EOL
384 B
Bash
Executable file
#! /usr/bin/env bash
|
|
# Copyright IBM Corp. 2013, 2025
|
|
# SPDX-License-Identifier: BUSL-1.1
|
|
|
|
|
|
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 |