Changeset 4abc9ec for jhalfs


Ignore:
Timestamp:
09/17/2006 10:26:55 AM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
experimental
Children:
2020b1b
Parents:
6ef1f44
Message:

Added version checks for DocBook XML dtd and XSL.
Added version checks to ./blfs-tool.
DocBook-XML-DTD and Tidy must be added yet to BLFS_TOOL installation dependencies.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jhalfs

    r6ef1f44 r4abc9ec  
    250250check_version "1.15.0"  "${tarVer}"      "TAR"
    251251
     252# Check for minimum sudo version
    252253SUDO_LOC="`whereis -b sudo | cut -d " " -f2`"
    253254if [ -x $SUDO_LOC ]; then
     
    259260fi
    260261
     262# Check for minimum libxml2 and libxslt versions
    261263xsltprocVer=`xsltproc -V | head -n1 `
    262264  libxmlVer=$(echo $xsltprocVer | cut -d " " -f3)
    263265 libxsltVer=$(echo $xsltprocVer | cut -d " " -f5)
    264     tidyVer=`tidy -V | cut -d " " -f9`
    265    
    266 # Version numbers are packed strings not xx.yy.zz format.
     266
     267  # Version numbers are packed strings not xx.yy.zz format.
    267268check_version "2.06.20"  "${libxmlVer:0:1}.${libxmlVer:1:2}.${libxmlVer:3:2}"     "LIBXML2"
    268269check_version "1.01.14"  "${libxsltVer:0:1}.${libxsltVer:1:2}.${libxsltVer:3:2}"  "LIBXSLT"
    269 check_version "2004"   "${tidyVer}"        "TIDY"
     270
     271# The next versions checks are required only when BLFS_TOOL is set and
     272# this dependencies has not be selected for installation
     273if [[ "$BLFS_TOOL" = "y" ]] ; then
     274
     275  if [[ -z "$DEP_TIDY" ]] ; then
     276    tidyVer=`tidy -V | cut -d " " -f9`
     277    check_version "2004" "${tidyVer}" "TIDY"
     278  fi
     279
     280# Check if the proper DocBook-XML-DTD and DocBook-XSL are correctly installed
     281XML_FILE="<?xml version='1.0' encoding='ISO-8859-1'?>
     282<?xml-stylesheet type='text/xsl' href='http://docbook.sourceforge.net/release/xsl/1.69.1/xhtml/docbook.xsl'?>
     283<!DOCTYPE article PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'
     284  'http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd'>
     285<article>
     286  <title>Test file</title>
     287  <sect1>
     288    <title>Some title</title>
     289    <para>Some text</para>
     290  </sect1>
     291</article>"
     292
     293  if [[ -z "$DEP_DBXML" ]] ; then
     294    if `echo $XML_FILE | xmllint -noout -postvalid - 2>/dev/null` ; then
     295      check_version "4.4" "4.4" "DocBook XML DTD"
     296    else
     297      echo "Warning: not found a working DocBook XML DTD 4.4 installation"
     298      exit 2
     299    fi
     300  fi
     301
     302  if [[ -z "$DEP_DBXSL" ]] ; then
     303    if `echo $XML_FILE | xsltproc --noout - 2>/dev/null` ; then
     304      check_version "1.69.1" "1.69.1" "DocBook XSL"
     305    else
     306      echo "Warning: not found a working DocBook XSL 1.69.1 installation"
     307      exit 2
     308    fi
     309  fi
     310
     311fi
    270312
    271313echo "${SD_BORDER}${nl_}"
Note: See TracChangeset for help on using the changeset viewer.