Merge trunk r3724
This commit is contained in:
parent
6c83a56f30
commit
90bfb42e51
2 changed files with 53 additions and 10 deletions
|
@ -17,20 +17,62 @@
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="emphasis">
|
<xsl:template match="emphasis">
|
||||||
|
<!-- We assume that what is emphasized is in the form:
|
||||||
|
aa...aa-dccsaaa (a anything except @, - "dash", d digit,
|
||||||
|
c anything except space, s space)
|
||||||
|
or
|
||||||
|
aa...aasdccsaaa
|
||||||
|
This means we have to replace digits with @, and look for '-@'
|
||||||
|
or ' @' -->
|
||||||
|
<xsl:variable name="normalized-string"
|
||||||
|
select="translate(normalize-space(string()),
|
||||||
|
'0123456789',
|
||||||
|
'@@@@@@@@@@')"/>
|
||||||
|
<xsl:variable name="begin-ver">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="contains($normalized-string,' @')">
|
||||||
|
<xsl:value-of select="string-length(substring-before($normalized-string,' @'))+1"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="string-length(substring-before($normalized-string,'-@'))+1"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
|
<xsl:variable name="remaining-part"
|
||||||
|
select="substring($normalized-string,number($begin-ver)+1)"/>
|
||||||
|
|
||||||
|
<xsl:variable name="end-ver">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="contains($remaining-part,' ')">
|
||||||
|
<xsl:value-of
|
||||||
|
select="string-length(substring-before($remaining-part,' '))"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of
|
||||||
|
select="string-length($remaining-part)"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
<xsl:text>local MIN_</xsl:text>
|
<xsl:text>local MIN_</xsl:text>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="contains(string(),' ')">
|
<xsl:when test="contains(string(),'Kernel')">
|
||||||
<xsl:value-of select=
|
<xsl:text>Linux</xsl:text>
|
||||||
"substring-before(substring-after(normalize-space(string()),
|
</xsl:when>
|
||||||
' '),
|
<xsl:when test="contains(string(),'GLIBC')">
|
||||||
'-')"/>
|
<xsl:text>Glibc</xsl:text>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="contains(string(),'XZ')">
|
||||||
|
<xsl:text>Xz</xsl:text>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="substring-before(string(),'-')"/>
|
<!-- We assume that there are no dash nor space in other names -->
|
||||||
|
<xsl:value-of select="substring(string(),1,number($begin-ver)-1)"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:text>_VER=</xsl:text>
|
<xsl:text>_VER=</xsl:text>
|
||||||
<xsl:value-of select="substring-after(string(),'-')"/>
|
<xsl:value-of select="substring(string(),number($begin-ver)+1,$end-ver)"/>
|
||||||
<xsl:text>
|
<xsl:text>
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
|
@ -54,7 +54,7 @@ inline_doc
|
||||||
echo -ne "${TXT}${dotSTR:${#TXT}} ${L_arrow}${BOLD}${tst_version}${OFF}${R_arrow}"
|
echo -ne "${TXT}${dotSTR:${#TXT}} ${L_arrow}${BOLD}${tst_version}${OFF}${R_arrow}"
|
||||||
|
|
||||||
# echo -ne "$TXT:\t${L_arrow}${BOLD}${tst_version}${OFF}${R_arrow}"
|
# echo -ne "$TXT:\t${L_arrow}${BOLD}${tst_version}${OFF}${R_arrow}"
|
||||||
IFS=".-(pa" # Split up w.x.y.z as well as w.x.y-rc (catch release candidates)
|
IFS=".-(pab" # Split up w.x.y.z as well as w.x.y-rc (catch release candidates)
|
||||||
set -- $ref_version # set positional parameters to minimum ver values
|
set -- $ref_version # set positional parameters to minimum ver values
|
||||||
ref_major=$1; ref_minor=$2; ref_revision=$3
|
ref_major=$1; ref_minor=$2; ref_revision=$3
|
||||||
#
|
#
|
||||||
|
@ -100,7 +100,7 @@ check_prerequisites() { #
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
|
|
||||||
# LFS/HLFS/CLFS prerequisites
|
# LFS/HLFS/CLFS prerequisites
|
||||||
check_version "$MIN_Kernel_VER" "`uname -r`" "KERNEL"
|
check_version "$MIN_Linux_VER" "`uname -r`" "KERNEL"
|
||||||
check_version "$MIN_Bash_VER" "$BASH_VERSION" "BASH"
|
check_version "$MIN_Bash_VER" "$BASH_VERSION" "BASH"
|
||||||
if [ ! -z $MIN_GCC_VER ]; then
|
if [ ! -z $MIN_GCC_VER ]; then
|
||||||
check_version "$MIN_GCC_VER" "`gcc -dumpversion`" "GCC"
|
check_version "$MIN_GCC_VER" "`gcc -dumpversion`" "GCC"
|
||||||
|
@ -128,10 +128,11 @@ check_prerequisites() { #
|
||||||
check_version "$MIN_Texinfo_VER" "$(makeinfo --version | head -n1 | awk '{ print$NF }')" "TEXINFO"
|
check_version "$MIN_Texinfo_VER" "$(makeinfo --version | head -n1 | awk '{ print$NF }')" "TEXINFO"
|
||||||
check_version "$MIN_Xz_VER" "$(xz --version | head -n1 | cut -d" " -f4)" "XZ"
|
check_version "$MIN_Xz_VER" "$(xz --version | head -n1 | cut -d" " -f4)" "XZ"
|
||||||
# Check for minimum sudo version
|
# Check for minimum sudo version
|
||||||
|
if [ -z $MIN_Sudo_VER ]; then MIN_Sudo_VER=1.7.0; fi
|
||||||
SUDO_LOC="$(whereis -b sudo | cut -d" " -f2)"
|
SUDO_LOC="$(whereis -b sudo | cut -d" " -f2)"
|
||||||
if [ -x $SUDO_LOC ]; then
|
if [ -x $SUDO_LOC ]; then
|
||||||
sudoVer="$(sudo -V | head -n1 | cut -d" " -f3)"
|
sudoVer="$(sudo -V | head -n1 | cut -d" " -f3)"
|
||||||
check_version "1.7.0" "${sudoVer}" "SUDO"
|
check_version "$MIN_Sudo_VER" "${sudoVer}" "SUDO"
|
||||||
else
|
else
|
||||||
echo "${nl_}\"${RED}sudo${OFF}\" ${BOLD}must be installed on your system for jhalfs to run"
|
echo "${nl_}\"${RED}sudo${OFF}\" ${BOLD}must be installed on your system for jhalfs to run"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Reference in a new issue