-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2399 from ipfs/fix/assert-gopath
assert that you must build from inside your gopath
- Loading branch information
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/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 |