kubo/bin/check_go_path
Jeromy aa6db5dde3 use makes realpath so its more crossplatform
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-03-01 11:24:01 -08:00

22 lines
426 B
Bash
Executable File

#!/bin/sh
PWD=$1
if [ -z "$PWD" ]; then
echo "must pass in your current working directory"
exit 1
fi
if [ -z "$GOPATH" ]; then
echo "GOPATH not set, you must have go configured properly to install ipfs"
exit 1
fi
EXPECTED="$GOPATH/src/github.com/ipfs/go-ipfs"
if [ "$PWD" != "$EXPECTED" ]; then
echo "go-ipfs must be built from within your \$GOPATH directory."
echo "expected '$EXPECTED' but got '$PWD'"
exit 1
fi