From 52831bed5e534c9e401d54bb318390c0e0b0261a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=A0=8B?= <1209756284@qq.com> Date: Mon, 27 Sep 2021 02:08:38 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AE=80=E5=8C=96=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E8=84=9A=E6=9C=AC=E9=80=82=E9=85=8D2.1.0=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- simpleInstall/install.sh | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/simpleInstall/install.sh b/simpleInstall/install.sh index d53c93f..67547b2 100644 --- a/simpleInstall/install.sh +++ b/simpleInstall/install.sh @@ -8,6 +8,7 @@ then fi readonly cur_path=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd && cd - &>/dev/null) +readonly version="2.1.0" source $cur_path"/common.sh" @@ -111,35 +112,35 @@ function fn_get_openGauss_tar() fi cd "$install_tar" - if [ "`find $cur_path/../ -maxdepth 1 -name "openGauss-2.0.0-*"|wc -l`" -lt "3" ] + if [ "`find $cur_path/../ -maxdepth 1 -name "openGauss-${version}-*"|wc -l`" -lt "3" ] then - if [ "`find . -name "openGauss-2.0.0-*"|wc -l`" -lt "3" ] && [ "$system_name"X != "Ubuntu"X ] + if [ "`find . -name "openGauss-${version}-*"|wc -l`" -lt "3" ] && [ "$system_name"X != "Ubuntu"X ] then - url="https://opengauss.obs.cn-south-1.myhuaweicloud.com/2.0.0/${system_arch}/openGauss-2.0.0-${system_name}-64bit-all.tar.gz" + url="https://opengauss.obs.cn-south-1.myhuaweicloud.com/${version}/${system_arch}/openGauss-${version}-${system_name}-64bit-all.tar.gz" echo "Downloading openGauss tar from official website at ${install_tar}" - wget $url --timeout=30 --tries=3 && tar -zxf openGauss-2.0.0-${system_name}-64bit-all.tar.gz + wget $url --timeout=30 --tries=3 && tar -zxf openGauss-${version}-${system_name}-64bit-all.tar.gz if [ $? -ne 0 ] then - echo "wget error. The $install_tar need openGauss-2.0.0-${system_name}-64bit-om.tar.gz" - echo "wget error. The $install_tar need openGauss-2.0.0-${system_name}-64bit.sha256" - echo "wget error. The $install_tar need openGauss-2.0.0-${system_name}-64bit.tar.bz2" + echo "wget error. The $install_tar need openGauss-${version}-${system_name}-64bit-om.tar.gz" + echo "wget error. The $install_tar need openGauss-${version}-${system_name}-64bit.sha256" + echo "wget error. The $install_tar need openGauss-${version}-${system_name}-64bit.tar.bz2" return 1 else echo "wget success." fi else echo "Can not found openGauss install pkg." - echo "The $install_tar need openGauss-2.0.0-${system_name}-64bit-om.tar.gz" - echo "The $install_tar need openGauss-2.0.0-${system_name}-64bit.sha256" - echo "The $install_tar need openGauss-2.0.0-${system_name}-64bit.tar.bz2" + echo "The $install_tar need openGauss-${version}-${system_name}-64bit-om.tar.gz" + echo "The $install_tar need openGauss-${version}-${system_name}-64bit.sha256" + echo "The $install_tar need openGauss-${version}-${system_name}-64bit.tar.bz2" return 1 fi else - if [ "`find . -name "openGauss-2.0.0-*"|wc -l`" -lt "3" ] + if [ "`find . -name "openGauss-${version}-*"|wc -l`" -lt "3" ] then - cp "$cur_path/../openGauss-2.0.0-${system_name}-64bit-om.tar.gz" \ - "$cur_path/../openGauss-2.0.0-${system_name}-64bit.tar.bz2" \ - "$cur_path/../openGauss-2.0.0-${system_name}-64bit.sha256" "$install_tar" + cp "$cur_path/../openGauss-${version}-${system_name}-64bit-om.tar.gz" \ + "$cur_path/../openGauss-${version}-${system_name}-64bit.tar.bz2" \ + "$cur_path/../openGauss-${version}-${system_name}-64bit.sha256" "$install_tar" if [ $? -ne 0 ] then echo "copy Installation package error." @@ -308,7 +309,7 @@ function fn_tar() echo "Get openGauss Installation package success." fi cd "${install_tar}" - tar -zxf "openGauss-2.0.0-${system_name}-64bit-om.tar.gz" + tar -zxf "openGauss-${version}-${system_name}-64bit-om.tar.gz" if [ $? -ne 0 ] then echo "tar package error."