Changeset 41b5665
- Timestamp:
- 09/25/2006 09:40:05 PM (18 years ago)
- Branches:
- experimental
- Children:
- e590acb
- Parents:
- 3f1d46c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/func_check_version.sh
r3f1d46c r41b5665 23 23 declare -i major minor revision change 24 24 declare -i ref_major ref_minor ref_revision ref_change 25 25 declare -r spaceSTR=" " 26 26 27 ref_version=$1 27 28 tst_version=$2 … … 37 38 } 38 39 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}" 40 41 41 42 # echo -ne "$TXT:\t${L_arrow}${BOLD}${tst_version}${OFF}${R_arrow}" … … 48 49 # 49 50 # Compare against minimum acceptable version.. 50 (( major > ref_major )) && echo " ..${GREEN}OK${OFF}" && return51 (( major > ref_major )) && echo " ${spaceSTR:${#tst_version}}${GREEN}OK${OFF}" && return 51 52 (( major < ref_major )) && write_error_and_die 52 53 # major=ref_major 53 54 (( minor < ref_minor )) && write_error_and_die 54 (( minor > ref_minor )) && echo " ..${GREEN}OK${OFF}" && return55 (( minor > ref_minor )) && echo " ${spaceSTR:${#tst_version}}${GREEN}OK${OFF}" && return 55 56 # minor=ref_minor 56 (( revision >= ref_revision )) && echo " ..${GREEN}OK${OFF}" && return57 (( revision >= ref_revision )) && echo " ${spaceSTR:${#tst_version}}${GREEN}OK${OFF}" && return 57 58 58 59 # oops.. write error msg and die 59 60 write_error_and_die 60 61 } 62 # local -r PARAM_VALS='${config_param}${dotSTR:${#config_param}} ${L_arrow}${BOLD}${!config_param}${OFF}${R_arrow}' 61 63 62 64 #----------------------------# … … 69 71 check_version "2.0.5" "$BASH_VERSION" "BASH" 70 72 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" 71 77 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"73 78 bzip2Ver="`bzip2 --version 2>&1 < /dev/null | head -n1 | cut -d\" \" -f8`" 74 79 check_version "1.0.3" "${bzip2Ver%%,*}" "BZIP2" … … 77 82 check_version "4.1.20" "`find --version | head -n1 | cut -d \" \" -f4`" "FIND" 78 83 check_version "3.0" "`gawk --version | head -n1 | cut -d \" \" -f3`" "GAWK" 79 # /lib/libc.so.6 | head -n1 | cut -d" " -f1-780 84 check_version "2.5" "`grep --version | head -n1 | cut -d \" \" -f4`" "GREP" 81 85 # #echo -n "gzip: "; gzip --version | head -n1
Note:
See TracChangeset
for help on using the changeset viewer.