Ignore:
Timestamp:
09/25/2006 09:40:05 PM (18 years ago)
Author:
George Boudreau <georgeb@…>
Branches:
experimental
Children:
e590acb
Parents:
3f1d46c
Message:

Added missing version test for GLIBC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/func_check_version.sh

    r3f1d46c r41b5665  
    2323  declare -i major minor revision change
    2424  declare -i ref_major ref_minor ref_revision ref_change
    25 
     25  declare -r spaceSTR="         "
     26 
    2627  ref_version=$1
    2728  tst_version=$2
     
    3738  }
    3839
    39   echo -ne "${TXT}${dotSTR:${#TXT}}${L_arrow}${BOLD}${tst_version}${OFF}${R_arrow}"
     40  echo -ne "${TXT}${dotSTR:${#TXT}} ${L_arrow}${BOLD}${tst_version}${OFF}${R_arrow}"
    4041
    4142#  echo -ne "$TXT:\t${L_arrow}${BOLD}${tst_version}${OFF}${R_arrow}"
     
    4849  #
    4950  # Compare against minimum acceptable version..
    50   (( major > ref_major )) && echo " ..${GREEN}OK${OFF}" && return
     51  (( major > ref_major )) && echo " ${spaceSTR:${#tst_version}}${GREEN}OK${OFF}" && return
    5152  (( major < ref_major )) && write_error_and_die
    5253    # major=ref_major
    5354  (( minor < ref_minor )) && write_error_and_die
    54   (( minor > ref_minor )) && echo " ..${GREEN}OK${OFF}" && return
     55  (( minor > ref_minor )) && echo " ${spaceSTR:${#tst_version}}${GREEN}OK${OFF}" && return
    5556    # minor=ref_minor
    56   (( revision >= ref_revision )) && echo " ..${GREEN}OK${OFF}" && return
     57  (( revision >= ref_revision )) && echo " ${spaceSTR:${#tst_version}}${GREEN}OK${OFF}" && return
    5758
    5859  # oops.. write error msg and die
    5960  write_error_and_die
    6061}
     62#  local -r PARAM_VALS='${config_param}${dotSTR:${#config_param}} ${L_arrow}${BOLD}${!config_param}${OFF}${R_arrow}'
    6163
    6264#----------------------------#
     
    6971    check_version "2.0.5"    "$BASH_VERSION"                                    "BASH"
    7072    check_version "3.0.0"    "`gcc -dumpversion`"                               "GCC"
     73    libcVer="`/lib/libc.so.6 | head -n1`"
     74    libcVer="${libcVer##*version }"
     75    check_version "2.2.5"    ${libcVer%%,*}                                     "GLIBC"
     76    check_version "1.12"     "`ld --version | head -n1 | cut -d\" \" -f4`"      "BINUTILS"
    7177    check_version "1.14"     "`tar --version | head -n1 | cut -d \" \" -f4`"    "TAR"
    72     check_version "1.12"     "`ld --version | head -n1 | cut -d\" \" -f4`"      "BINUTILS"
    7378    bzip2Ver="`bzip2 --version 2>&1 < /dev/null | head -n1 | cut -d\" \" -f8`"
    7479    check_version "1.0.3"    "${bzip2Ver%%,*}"                                  "BZIP2"
     
    7782    check_version "4.1.20"   "`find --version | head -n1 | cut -d \" \" -f4`"   "FIND"
    7883    check_version "3.0"      "`gawk --version | head -n1 | cut -d \" \" -f3`"   "GAWK"
    79 #  /lib/libc.so.6 | head -n1 | cut -d" " -f1-7
    8084    check_version "2.5"      "`grep --version | head -n1 | cut -d \" \" -f4`"   "GREP"
    8185#  #echo -n "gzip: ";  gzip --version | head -n1
Note: See TracChangeset for help on using the changeset viewer.