kubo/bin/check_go_path
Jakub Sztandera 67a6e63eb2 Correct output
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2018-03-23 07:09:32 +01:00

20 lines
315 B
Bash
Executable File

#!/bin/sh
PWD=$1
if [ -z "$PWD" ]; then
echo "must pass in your current working directory"
exit 1
fi
while [ ${#} -gt 1 ]; do
if [ "$PWD" = "$2" ]; then
exit 0
fi
shift
done
echo "go-ipfs must be built from within your \$GOPATH directory."
echo "expected within '$(go env GOPATH)' but got '$PWD'"
exit 1