fix for install script devel

This commit is contained in:
Eric Robitaille 2014-11-20 15:02:24 -05:00
parent d5ac24907e
commit c0bbb7e69a

View File

@ -1,14 +1,20 @@
#!/bin/sh #!/bin/sh
if [ "$1" == "" ]; then if [ "$1" == "" ]; then
echo "Usage $0 executable ethereum branch develop" echo "Usage $0 executable branch"
echo "executable ethereum or mist" echo "executable ethereum | mist"
echo "branch develop or master" echo "branch develop | master"
exit exit
fi fi
exe=$1 exe=$1
branch=$2 branch=$2
branchPath=""
# Set branchPath for develop as executables have moved
if [ "$branch" == "develop" ]; then
branchPath="cmd/"
fi
# Test if go is installed # Test if go is installed
command -v go >/dev/null 2>&1 || { echo >&2 "Unable to find 'go'. This script requires go."; exit 1; } command -v go >/dev/null 2>&1 || { echo >&2 "Unable to find 'go'. This script requires go."; exit 1; }
@ -19,8 +25,8 @@ if [ "$GOPATH" == "" ]; then
exit exit
fi fi
echo "go get -u -d github.com/ethereum/go-ethereum/cmd/$exe" echo "go get -u -d github.com/ethereum/go-ethereum/$branchPath$exe"
go get -v -u -d github.com/ethereum/go-ethereum/cmd/$exe go get -v -u -d github.com/ethereum/go-ethereum/$branchPath$exe
if [ $? != 0 ]; then if [ $? != 0 ]; then
echo "go get failed" echo "go get failed"
exit exit
@ -31,7 +37,7 @@ cd $GOPATH/src/github.com/ethereum/go-ethereum
git checkout $branch git checkout $branch
echo "go-ethereum" echo "go-ethereum"
cd $GOPATH/src/github.com/ethereum/go-ethereum/cmd/$exe cd $GOPATH/src/github.com/ethereum/go-ethereum/$branchPath$exe
git checkout $branch git checkout $branch
if [ "$exe" == "mist" ]; then if [ "$exe" == "mist" ]; then