From: vsr Date: Tue, 15 Feb 2005 10:59:38 +0000 (+0000) Subject: Modify check version number procedure for gcc X-Git-Tag: SALOME_V_2_2_0~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fcc9a23a1b50c6e3d179488c7e73c159477f2184;p=tools%2Finstall.git Modify check version number procedure for gcc --- diff --git a/config_files/gcc-3.2.sh b/config_files/gcc-3.2.sh index e148073..506ade8 100755 --- a/config_files/gcc-3.2.sh +++ b/config_files/gcc-3.2.sh @@ -1,11 +1,7 @@ #!/bin/sh check_version(){ -gcc_ver=`gcc -dumpversion` -gcc_ver_number=`echo $gcc_ver | cut -d . -f 1` -gcc_ver_subnumber=`echo $gcc_ver | cut -d . -f 2` -gcc_ver=$(($gcc_ver_number*1000+$gcc_ver_subnumber)) -#if [ `gcc --version | grep 'gcc (GCC) .*' | cut -b 11-13` == "3.2" ] ; then +gcc_ver=`gcc -dumpversion | awk -F. '{ print $1 * 1000 + $2 }'` if [ $gcc_ver -eq 3002 ] ; then return 0 fi @@ -34,11 +30,7 @@ if [ -z "${gcc_root}" ] ; then fi if [ -n "${gcc_root}" ] ; then gcc_root=`cd ${gcc_root}/..; pwd` - gcc_ver=`gcc -dumpversion` - gcc_ver_number=`echo $gcc_ver | cut -d . -f 1` - gcc_ver_subnumber=`echo $gcc_ver | cut -d . -f 2` - gcc_ver=$(($gcc_ver_number*1000+$gcc_ver_subnumber)) - #if [ "`${gcc_root}/bin/gcc --version | grep 'gcc (GCC) .*' | cut -b 11-13`" = "3.2" ] ; then + gcc_ver=`gcc -dumpversion | awk -F. '{ print $1 * 1000 + $2 }'` if [ $gcc_ver -ge 3002 ] ; then tmp="\${GCC_ROOT}/bin ${gcc_root}/bin \${PATH} ${PATH}"; path=`sort_path ${tmp}`