u
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
defaultVERSION=1.10.26
|
||||
defaultVERSION=1.11.2
|
||||
|
||||
if [ $1 ]
|
||||
then
|
||||
@@ -15,6 +15,7 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
ARCH=amd64
|
||||
|
||||
echo "=== Install geth:[b] for 二进制, [s] for 源代码,[anything else or leave blank] for no change"
|
||||
read -p ">>> " BINARY_OR_SOURCE
|
||||
@@ -25,21 +26,20 @@ then
|
||||
# cd ./geth-temp
|
||||
if [ "$VERSION" == '1.10.26' ]
|
||||
then
|
||||
wget https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.10.26-e5eb32ac.tar.gz -O geth-linux-amd64-$VERSION.tgz
|
||||
wget https://gethstore.blob.core.windows.net/builds/geth-linux-$ARCH-$VERSION-e5eb32ac.tar.gz -O geth-linux.tgz
|
||||
elif [ "$VERSION" == '1.10.25' ]
|
||||
then
|
||||
wget https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.10.25-69568c55.tar.gz -O geth-linux-amd64-$VERSION.tgz
|
||||
wget https://gethstore.blob.core.windows.net/builds/geth-linux-$ARCH-$VERSION-69568c55.tar.gz -O geth-linux.tgz
|
||||
else
|
||||
echo "=== please find the download link in https://geth.ethereum.org/downloads"
|
||||
read -p ">>> " DOWNLINK
|
||||
wget $DOWNLINK -O geth-linux-amd64-$VERSION.tgz
|
||||
wget $DOWNLINK -O geth-linux.tgz
|
||||
fi
|
||||
tar xzf ./geth-linux-amd64-$VERSION.tgz # --strip-components 1 ## 去掉tar包中顶级目录,因为顶级目录含有checksum,不方便在下一步进入
|
||||
tar xzf ./geth-linux.tgz # --strip-components 1 ## 去掉tar包中顶级目录,因为顶级目录含有checksum,不方便在下一步进入
|
||||
echo "--- 安装到 /usr/local/bin/geth"
|
||||
mv ./geth-linux-amd64-*/geth /usr/local/bin/
|
||||
# echo "--- 删除原始文件"
|
||||
# cd ..
|
||||
# rm -fr ./geth-temp
|
||||
mv ./geth-linux-*/geth /usr/local/bin/
|
||||
echo "--- 删除原始文件"
|
||||
rm -fr ./geth-linux.tgz ./geth-linux-$ARCH-$VERSION-*/
|
||||
elif [ "$BINARY_OR_SOURCE" == 's' ]
|
||||
then
|
||||
echo "--- 克隆并编译 geth"
|
||||
|
||||
Reference in New Issue
Block a user