Changeset 3f1d46c
- Timestamp:
- 09/25/2006 04:54:31 PM (18 years ago)
- Branches:
- experimental
- Children:
- 41b5665
- Parents:
- 928ee4d
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
common/func_check_version.sh
r928ee4d r3f1d46c 60 60 } 61 61 62 #----------------------------# 63 check_prerequisites() { # 64 #----------------------------# 65 66 # LFS/HLFS/CLFS prerequisites 67 if [ ! "${PROGNAME}" = "hlfs" ]; then 68 check_version "2.6.2" "`uname -r`" "KERNEL" 69 check_version "2.0.5" "$BASH_VERSION" "BASH" 70 check_version "3.0.0" "`gcc -dumpversion`" "GCC" 71 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 bzip2Ver="`bzip2 --version 2>&1 < /dev/null | head -n1 | cut -d\" \" -f8`" 74 check_version "1.0.3" "${bzip2Ver%%,*}" "BZIP2" 75 check_version "5.0" "`chown --version | head -n1 | cut -d\")\" -f2`" "COREUTILS" 76 check_version "2.8" "`diff --version | head -n1 | cut -d \" \" -f4`" "DIFF" 77 check_version "4.1.20" "`find --version | head -n1 | cut -d \" \" -f4`" "FIND" 78 check_version "3.0" "`gawk --version | head -n1 | cut -d \" \" -f3`" "GAWK" 79 # /lib/libc.so.6 | head -n1 | cut -d" " -f1-7 80 check_version "2.5" "`grep --version | head -n1 | cut -d \" \" -f4`" "GREP" 81 # #echo -n "gzip: "; gzip --version | head -n1 82 check_version "3.79.1" "`make --version | head -n1 | cut -d \" \" -f3`" "MAKE" 83 check_version "2.5.4" "`patch --version | head -n1 | cut -d \" \" -f2`" "PATCH" 84 check_version "3.0.2" "`sed --version | head -n1 | cut -d \" \" -f4`" "SED" 85 else 86 # LFS/HLFS/CLFS prerequisites 87 check_version "2.6.2" "`uname -r`" "KERNEL" 88 check_version "3.0" "$BASH_VERSION" "BASH" 89 check_version "3.0" "`gcc -dumpversion`" "GCC" 90 check_version "1.1" "`tar --version | head -n1 | cut -d \" \" -f4`" "TAR" 91 fi 92 93 # Check for minimum sudo version 94 SUDO_LOC="`whereis -b sudo | cut -d " " -f2`" 95 if [ -x $SUDO_LOC ]; then 96 sudoVer=`sudo -V | head -n1 | cut -d " " -f3` 97 check_version "1.6.8" "${sudoVer}" "SUDO" 98 else 99 echo "${nl_}\"${RED}sudo${OFF}\" ${BOLD}must be installed on your system for jhalfs to run" 100 exit 1 101 fi 102 103 # Check for minimum libxml2 and libxslt versions 104 xsltprocVer=`xsltproc -V | head -n1 ` 105 libxmlVer=$(echo $xsltprocVer | cut -d " " -f3) 106 libxsltVer=$(echo $xsltprocVer | cut -d " " -f5) 107 108 # Version numbers are packed strings not xx.yy.zz format. 109 check_version "2.06.20" "${libxmlVer:0:1}.${libxmlVer:1:2}.${libxmlVer:3:2}" "LIBXML2" 110 check_version "1.01.14" "${libxsltVer:0:1}.${libxsltVer:1:2}.${libxsltVer:3:2}" "LIBXSLT" 111 112 # The next versions checks are required only when BLFS_TOOL is set and 113 # this dependencies has not be selected for installation 114 if [[ "$BLFS_TOOL" = "y" ]] ; then 115 116 if [[ -z "$DEP_TIDY" ]] ; then 117 tidyVer=`tidy -V | cut -d " " -f9` 118 check_version "2004" "${tidyVer}" "TIDY" 119 fi 120 121 # Check if the proper DocBook-XML-DTD and DocBook-XSL are correctly installed 122 XML_FILE="<?xml version='1.0' encoding='ISO-8859-1'?> 123 <?xml-stylesheet type='text/xsl' href='http://docbook.sourceforge.net/release/xsl/1.69.1/xhtml/docbook.xsl'?> 124 <!DOCTYPE article PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN' 125 'http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd'> 126 <article> 127 <title>Test file</title> 128 <sect1> 129 <title>Some title</title> 130 <para>Some text</para> 131 </sect1> 132 </article>" 133 134 if [[ -z "$DEP_DBXML" ]] ; then 135 if `echo $XML_FILE | xmllint -noout -postvalid - 2>/dev/null` ; then 136 check_version "4.4" "4.4" "DocBook XML DTD" 137 else 138 echo "Warning: not found a working DocBook XML DTD 4.4 installation" 139 exit 2 140 fi 141 fi 142 143 if [[ -z "$DEP_DBXSL" ]] ; then 144 if `echo $XML_FILE | xsltproc --noout - 2>/dev/null` ; then 145 check_version "1.69.1" "1.69.1" "DocBook XSL" 146 else 147 echo "Warning: not found a working DocBook XSL 1.69.1 installation" 148 exit 2 149 fi 150 fi 151 152 fi # end BLFS_TOOL=Y 153 154 } -
jhalfs
r928ee4d r3f1d46c 258 258 ################################### 259 259 260 # Check for minimum bash,tar,gcc and kernel versions260 # Check for build prereequisites. 261 261 echo 262 check_version "2.6.2" "`uname -r`" "KERNEL" 263 check_version "3.0" "$BASH_VERSION" "BASH" 264 check_version "3.0" "`gcc -dumpversion`" "GCC" 265 tarVer=`tar --version | head -n1 | cut -d " " -f4` 266 check_version "1.15.0" "${tarVer}" "TAR" 267 268 # Check for minimum sudo version 269 SUDO_LOC="`whereis -b sudo | cut -d " " -f2`" 270 if [ -x $SUDO_LOC ]; then 271 sudoVer=`sudo -V | head -n1 | cut -d " " -f3` 272 check_version "1.6.8" "${sudoVer}" "SUDO" 273 else 274 echo "${nl_}\"${RED}sudo${OFF}\" ${BOLD}must be installed on your system for jhalfs to run" 275 exit 1 276 fi 277 278 # Check for minimum libxml2 and libxslt versions 279 xsltprocVer=`xsltproc -V | head -n1 ` 280 libxmlVer=$(echo $xsltprocVer | cut -d " " -f3) 281 libxsltVer=$(echo $xsltprocVer | cut -d " " -f5) 282 283 # Version numbers are packed strings not xx.yy.zz format. 284 check_version "2.06.20" "${libxmlVer:0:1}.${libxmlVer:1:2}.${libxmlVer:3:2}" "LIBXML2" 285 check_version "1.01.14" "${libxsltVer:0:1}.${libxsltVer:1:2}.${libxsltVer:3:2}" "LIBXSLT" 286 287 # The next versions checks are required only when BLFS_TOOL is set and 288 # this dependencies has not be selected for installation 289 if [[ "$BLFS_TOOL" = "y" ]] ; then 290 291 if [[ -z "$DEP_TIDY" ]] ; then 292 tidyVer=`tidy -V | cut -d " " -f9` 293 check_version "2004" "${tidyVer}" "TIDY" 294 fi 295 296 # Check if the proper DocBook-XML-DTD and DocBook-XSL are correctly installed 297 XML_FILE="<?xml version='1.0' encoding='ISO-8859-1'?> 298 <?xml-stylesheet type='text/xsl' href='http://docbook.sourceforge.net/release/xsl/1.69.1/xhtml/docbook.xsl'?> 299 <!DOCTYPE article PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN' 300 'http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd'> 301 <article> 302 <title>Test file</title> 303 <sect1> 304 <title>Some title</title> 305 <para>Some text</para> 306 </sect1> 307 </article>" 308 309 if [[ -z "$DEP_DBXML" ]] ; then 310 if `echo $XML_FILE | xmllint -noout -postvalid - 2>/dev/null` ; then 311 check_version "4.4" "4.4" "DocBook XML DTD" 312 else 313 echo "Warning: not found a working DocBook XML DTD 4.4 installation" 314 exit 2 315 fi 316 fi 317 318 if [[ -z "$DEP_DBXSL" ]] ; then 319 if `echo $XML_FILE | xsltproc --noout - 2>/dev/null` ; then 320 check_version "1.69.1" "1.69.1" "DocBook XSL" 321 else 322 echo "Warning: not found a working DocBook XSL 1.69.1 installation" 323 exit 2 324 fi 325 fi 326 327 fi 328 262 check_prerequisites 329 263 echo "${SD_BORDER}${nl_}" 330 264
Note:
See TracChangeset
for help on using the changeset viewer.