mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
21 lines
449 B
Bash
Executable File
21 lines
449 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ -z "$GOPATH" ]; then
|
|
echo "GOPATH not set, you must have go configured properly to install ipfs"
|
|
exit 1
|
|
fi
|
|
|
|
if ! type -f realpath > /dev/null; then
|
|
echo "program 'realpath' not found, it is required for this check"
|
|
exit 1
|
|
fi
|
|
|
|
PWD=$(pwd)
|
|
REALPWD=$(realpath "$PWD")
|
|
EXPECTED="$GOPATH/src/github.com/ipfs/go-ipfs"
|
|
|
|
if [ "$REALPWD" != "$EXPECTED" ]; then
|
|
echo "go-ipfs must be built from within your \$GOPATH directory."
|
|
exit 1
|
|
fi
|