forked from cerc-io/plugeth
changed install.sh to change branch and install executable
This commit is contained in:
parent
c0bbb7e69a
commit
6c098ee779
23
install.sh
23
install.sh
@ -8,12 +8,11 @@ if [ "$1" == "" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
exe=$1
|
exe=$1
|
||||||
|
path=$exe
|
||||||
branch=$2
|
branch=$2
|
||||||
branchPath=""
|
|
||||||
|
|
||||||
# Set branchPath for develop as executables have moved
|
|
||||||
if [ "$branch" == "develop" ]; then
|
if [ "$branch" == "develop" ]; then
|
||||||
branchPath="cmd/"
|
path="cmd/$exe"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Test if go is installed
|
# Test if go is installed
|
||||||
@ -25,20 +24,11 @@ if [ "$GOPATH" == "" ]; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "go get -u -d github.com/ethereum/go-ethereum/$branchPath$exe"
|
echo "changing branch to $branch"
|
||||||
go get -v -u -d github.com/ethereum/go-ethereum/$branchPath$exe
|
|
||||||
if [ $? != 0 ]; then
|
|
||||||
echo "go get failed"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "eth-go"
|
|
||||||
cd $GOPATH/src/github.com/ethereum/go-ethereum
|
cd $GOPATH/src/github.com/ethereum/go-ethereum
|
||||||
git checkout $branch
|
git checkout $branch
|
||||||
|
|
||||||
echo "go-ethereum"
|
cd $GOPATH/src/github.com/ethereum/go-ethereum/$path
|
||||||
cd $GOPATH/src/github.com/ethereum/go-ethereum/$branchPath$exe
|
|
||||||
git checkout $branch
|
|
||||||
|
|
||||||
if [ "$exe" == "mist" ]; then
|
if [ "$exe" == "mist" ]; then
|
||||||
echo "Building Mist GUI. Assuming Qt is installed. If this step"
|
echo "Building Mist GUI. Assuming Qt is installed. If this step"
|
||||||
@ -48,9 +38,4 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
go install
|
go install
|
||||||
if [ $? == 0 ]; then
|
|
||||||
echo "go install failed"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "done. Please run $exe :-)"
|
echo "done. Please run $exe :-)"
|
||||||
|
Loading…
Reference in New Issue
Block a user