Changeset 90bfb42e
- Timestamp:
- 09/21/2013 07:02:11 PM (11 years ago)
- Branches:
- ablfs
- Children:
- d928c71
- Parents:
- 6c83a56
- Location:
- common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
common/hostreqs.xsl
r6c83a56 r90bfb42e 18 18 19 19 <xsl:template match="emphasis"> 20 <!-- We assume that what is emphasized is in the form: 21 aa...aa-dccsaaa (a anything except @, - "dash", d digit, 22 c anything except space, s space) 23 or 24 aa...aasdccsaaa 25 This means we have to replace digits with @, and look for '-@' 26 or ' @' --> 27 <xsl:variable name="normalized-string" 28 select="translate(normalize-space(string()), 29 '0123456789', 30 '@@@@@@@@@@')"/> 31 <xsl:variable name="begin-ver"> 32 <xsl:choose> 33 <xsl:when test="contains($normalized-string,' @')"> 34 <xsl:value-of select="string-length(substring-before($normalized-string,' @'))+1"/> 35 </xsl:when> 36 <xsl:otherwise> 37 <xsl:value-of select="string-length(substring-before($normalized-string,'-@'))+1"/> 38 </xsl:otherwise> 39 </xsl:choose> 40 </xsl:variable> 41 42 <xsl:variable name="remaining-part" 43 select="substring($normalized-string,number($begin-ver)+1)"/> 44 45 <xsl:variable name="end-ver"> 46 <xsl:choose> 47 <xsl:when test="contains($remaining-part,' ')"> 48 <xsl:value-of 49 select="string-length(substring-before($remaining-part,' '))"/> 50 </xsl:when> 51 <xsl:otherwise> 52 <xsl:value-of 53 select="string-length($remaining-part)"/> 54 </xsl:otherwise> 55 </xsl:choose> 56 </xsl:variable> 57 20 58 <xsl:text>local MIN_</xsl:text> 21 59 <xsl:choose> 22 <xsl:when test="contains(string(),' ')"> 23 <xsl:value-of select= 24 "substring-before(substring-after(normalize-space(string()), 25 ' '), 26 '-')"/> 60 <xsl:when test="contains(string(),'Kernel')"> 61 <xsl:text>Linux</xsl:text> 62 </xsl:when> 63 <xsl:when test="contains(string(),'GLIBC')"> 64 <xsl:text>Glibc</xsl:text> 65 </xsl:when> 66 <xsl:when test="contains(string(),'XZ')"> 67 <xsl:text>Xz</xsl:text> 27 68 </xsl:when> 28 69 <xsl:otherwise> 29 <xsl:value-of select="substring-before(string(),'-')"/> 70 <!-- We assume that there are no dash nor space in other names --> 71 <xsl:value-of select="substring(string(),1,number($begin-ver)-1)"/> 30 72 </xsl:otherwise> 31 73 </xsl:choose> 32 74 <xsl:text>_VER=</xsl:text> 33 <xsl:value-of select="substring -after(string(),'-')"/>75 <xsl:value-of select="substring(string(),number($begin-ver)+1,$end-ver)"/> 34 76 <xsl:text> 35 77 </xsl:text> -
common/libs/func_check_version.sh
r6c83a56 r90bfb42e 55 55 56 56 # echo -ne "$TXT:\t${L_arrow}${BOLD}${tst_version}${OFF}${R_arrow}" 57 IFS=".-(pa " # Split up w.x.y.z as well as w.x.y-rc (catch release candidates)57 IFS=".-(pab" # Split up w.x.y.z as well as w.x.y-rc (catch release candidates) 58 58 set -- $ref_version # set positional parameters to minimum ver values 59 59 ref_major=$1; ref_minor=$2; ref_revision=$3 … … 101 101 102 102 # LFS/HLFS/CLFS prerequisites 103 check_version "$MIN_ Kernel_VER""`uname -r`" "KERNEL"103 check_version "$MIN_Linux_VER" "`uname -r`" "KERNEL" 104 104 check_version "$MIN_Bash_VER" "$BASH_VERSION" "BASH" 105 105 if [ ! -z $MIN_GCC_VER ]; then … … 129 129 check_version "$MIN_Xz_VER" "$(xz --version | head -n1 | cut -d" " -f4)" "XZ" 130 130 # Check for minimum sudo version 131 if [ -z $MIN_Sudo_VER ]; then MIN_Sudo_VER=1.7.0; fi 131 132 SUDO_LOC="$(whereis -b sudo | cut -d" " -f2)" 132 133 if [ -x $SUDO_LOC ]; then 133 134 sudoVer="$(sudo -V | head -n1 | cut -d" " -f3)" 134 check_version " 1.7.0" "${sudoVer}" "SUDO"135 check_version "$MIN_Sudo_VER" "${sudoVer}" "SUDO" 135 136 else 136 137 echo "${nl_}\"${RED}sudo${OFF}\" ${BOLD}must be installed on your system for jhalfs to run"
Note:
See TracChangeset
for help on using the changeset viewer.