From 5161dbef0a2fdd2069c00584e3b4354c2ea3142c Mon Sep 17 00:00:00 2001 From: helloworld664 <3226476857@qq.com> Date: Thu, 25 Sep 2025 10:04:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=9C=AA=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package/pnetcdf/1.11.2/install.sh | 7 +++---- package/pnetcdf/1.12.1/install.sh | 7 +++---- package/pnetcdf/1.12.3/install.sh | 7 +++---- package/pnetcdf/1.9.0/install.sh | 7 +++---- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/package/pnetcdf/1.11.2/install.sh b/package/pnetcdf/1.11.2/install.sh index 130bb992..11360041 100755 --- a/package/pnetcdf/1.11.2/install.sh +++ b/package/pnetcdf/1.11.2/install.sh @@ -9,9 +9,8 @@ rm -rf pnetcdf-${pnetcdf_ver} tar zxvf ${JARVIS_DOWNLOAD}/pnetcdf-${pnetcdf_ver}.tar.gz cd pnetcdf-${pnetcdf_ver} use_gcc=0 -which_mpicc=`which mpicc 2> /dev/null 1> /dev/null` -which_ret=$? -if [ "$which_ret" -eq "0" ]; then +which mpicc 2> /dev/null 1> /dev/null +if [ "$?" -eq "0" ]; then if [ "`mpicc --version | grep gcc`" ]; then use_gcc=1 fi @@ -19,7 +18,7 @@ fi FFLAGS="" FCFLAGS="" if [ "$use_gcc" -eq "1" ]; then - if [ "`$CC --version | grep gcc | grep -oP \"\)\s*\K[0-9]+(?=\.)\"`" -ge '10' ]; then + if [ "`mpicc --version | grep gcc | grep -oP \"\)\s*\K[0-9]+(?=\.)\"`" -ge '10' ]; then FFLAGS="-fallow-argument-mismatch" FCFLAGS="-fallow-argument-mismatch" fi diff --git a/package/pnetcdf/1.12.1/install.sh b/package/pnetcdf/1.12.1/install.sh index 997edbea..df66345f 100755 --- a/package/pnetcdf/1.12.1/install.sh +++ b/package/pnetcdf/1.12.1/install.sh @@ -8,9 +8,8 @@ rm -rf pnetcdf-${pnetcdf_version} tar zxvf ${JARVIS_DOWNLOAD}/pnetcdf-${pnetcdf_version}.tar.gz cd pnetcdf-${pnetcdf_version} use_gcc=0 -which_mpicc=`which mpicc 2> /dev/null 1> /dev/null` -which_ret=$? -if [ "$which_ret" -eq "0" ]; then +which mpicc 2> /dev/null 1> /dev/null +if [ "$?" -eq "0" ]; then if [ "`mpicc --version | grep gcc`" ]; then use_gcc=1 fi @@ -18,7 +17,7 @@ fi FFLAGS="" FCFLAGS="" if [ "$use_gcc" -eq "1" ]; then - if [ "`$CC --version | grep gcc | grep -oP \"\)\s*\K[0-9]+(?=\.)\"`" -ge '10' ]; then + if [ "`mpicc --version | grep gcc | grep -oP \"\)\s*\K[0-9]+(?=\.)\"`" -ge '10' ]; then FFLAGS="-fallow-argument-mismatch" FCFLAGS="-fallow-argument-mismatch" fi diff --git a/package/pnetcdf/1.12.3/install.sh b/package/pnetcdf/1.12.3/install.sh index 7852f8e1..40783e73 100755 --- a/package/pnetcdf/1.12.3/install.sh +++ b/package/pnetcdf/1.12.3/install.sh @@ -7,9 +7,8 @@ cd ${JARVIS_TMP} tar zxvf ${JARVIS_DOWNLOAD}/pnetcdf-${pnetcdf_version}.tar.gz cd pnetcdf-${pnetcdf_version} use_gcc=0 -which_mpicc=`which mpicc 2> /dev/null 1> /dev/null` -which_ret=$? -if [ "$which_ret" -eq "0" ]; then +which mpicc 2> /dev/null 1> /dev/null +if [ "$?" -eq "0" ]; then if [ "`mpicc --version | grep gcc`" ]; then use_gcc=1 fi @@ -17,7 +16,7 @@ fi FFLAGS="-fPIC" FCFLAGS="-fPIC" if [ "$use_gcc" -eq "1" ]; then - if [ "`$CC --version | grep gcc | grep -oP \"\)\s*\K[0-9]+(?=\.)\"`" -ge '10' ]; then + if [ "`mpicc --version | grep gcc | grep -oP \"\)\s*\K[0-9]+(?=\.)\"`" -ge '10' ]; then FFLAGS="$FFLAGS -fallow-argument-mismatch" FCFLAGS="$FCFLAGS -fallow-argument-mismatch" fi diff --git a/package/pnetcdf/1.9.0/install.sh b/package/pnetcdf/1.9.0/install.sh index e910f9e7..a4279a74 100644 --- a/package/pnetcdf/1.9.0/install.sh +++ b/package/pnetcdf/1.9.0/install.sh @@ -9,9 +9,8 @@ rm -rf pnetcdf-${pnetcdf_ver} tar zxvf ${JARVIS_DOWNLOAD}/parallel-netcdf-1.9.0.tar.gz cd parallel-netcdf-1.9.0 use_gcc=0 -which_mpicc=`which mpicc 2> /dev/null 1> /dev/null` -which_ret=$? -if [ "$which_ret" -eq "0" ]; then +which mpicc 2> /dev/null 1> /dev/null +if [ "$?" -eq "0" ]; then if [ "`mpicc --version | grep gcc`" ]; then use_gcc=1 fi @@ -19,7 +18,7 @@ fi FFLAGS="" FCFLAGS="" if [ "$use_gcc" -eq "1" ]; then - if [ "`$CC --version | grep gcc | grep -oP \"\)\s*\K[0-9]+(?=\.)\"`" -ge '10' ]; then + if [ "`mpicc --version | grep gcc | grep -oP \"\)\s*\K[0-9]+(?=\.)\"`" -ge '10' ]; then FFLAGS="-fallow-argument-mismatch" FCFLAGS="-fallow-argument-mismatch" fi -- Gitee