- Timestamp:
- 08/13/2006 10:01:14 AM (18 years ago)
- Branches:
- experimental
- Children:
- 00f4966
- Parents:
- 1b99a8b
- Location:
- BLFS/libs
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
BLFS/libs/constants.inc
r1b99a8b rd0d9e90 34 34 declare -r R_arrow=$'\e[1;33m>\e[0m' 35 35 declare -r L_arrow=$'\e[1;33m<\e[0m' 36 37 HEADER="# This file is automatically generated by jhalfs38 # DO NOT EDIT THIS FILE MANUALLY39 #40 # Generated on `date \"+%F %X %Z\"`" -
BLFS/libs/func_dependencies
r1b99a8b rd0d9e90 63 63 ENTRY_END="\"/>" 64 64 65 echo -e n"\tGenerating $TARGET dependencies tree ..."65 echo -e "\tGenerating $TARGET dependencies tree ..." 66 66 67 67 mkdir dependencies … … 121 121 esac 122 122 123 #------------------P---124 # Start with a clean depure.txt file125 > depure.txt126 127 123 #--------------------- 128 124 # If have dependencies, write its XInclude and find sub-dependencies 129 125 if [[ -f dependencies/$TARGET.dep ]]; then 130 echo -e "Start loop for PKG $TARGET\n" >> depure.txt131 126 mkdir xincludes && do_dependencies $TARGET 132 127 fi 133 128 134 echo "done"129 echo -e "\n\t... done" 135 130 } 136 131 … … 167 162 local DEP_LV=$DEP_LEVEL 168 163 local line line2 DEP 169 echo -e "\tPKG is $PKG" >> depure.txt170 echo -e "\tDEP_LEVEL for $PKG is $DEP_LV\n" >> depure.txt171 164 172 165 #------------------ 173 166 # If a premade xinclude file exists, use it. If not, create one 174 167 if [[ -f xincludes/$PKG.xinc ]] ; then 175 echo -e "\tReusing xinclude file for PKG $PKG" >> depure.txt176 168 IFS=$'\x0A' 177 169 for line in `cat xincludes/$PKG.xinc` ; do … … 219 211 220 212 #------------------ 221 echo -e "\tDEP for $PKG is $DEP" >> depure.txt222 213 # Prevent circular dependencies 223 214 # If all dependencies are circular, the creation of the *.dep file … … 260 251 261 252 #------------------ 262 echo -e "\tDEP_LEVEL for $DEP is $DEP_LV" >> depure.txt263 253 # XML file of dependency package 264 254 DEP_XML=`grep "^$DEP[[:space:]]" ../packages | cut -f2` 265 echo -e "\t\tDEP_XML is $DEP_XML\n" >> depure.txt266 255 case $DEP in 267 256 x-window-system | alsa ) ;; # No page for that (proper link must be created when generating the book) … … 310 299 # If a premade xinclude file esist, include it 311 300 if [[ -f xincludes/$DEP.xinc ]] ; then 312 echo -e "\tReusing xinclude file for PKG $DEP (to solve $PKG)\n" >> depure.txt313 301 IFS=$'\x0A' 314 302 for line2 in `cat xincludes/$DEP.xinc` ; do … … 322 310 # Create the xinclude file 323 311 else 324 echo -e "\nStart new loop for PKG $DEP (to solve $PKG)\n" >> depure.txt325 312 # 326 313 # >>>>>> THIS IS A RECURSIVE FUNCTION CALL.. BEWARE OF GREMLINS. <<<<<< … … 330 317 # 331 318 set +e 332 [[ "${VERBOSITY}" > 0 ]] && echo -ne "\n recursive call: $((++cntr)) ${spaceSTR:0:$cntr}${RED}$DEP${OFF}"319 [[ "${VERBOSITY}" > 0 ]] && echo -ne "\ncall: $((++cntr))${spaceSTR:0:$cntr}${RED}$DEP${OFF}" 333 320 do_dependencies $DEP 334 [[ "${VERBOSITY}" > 0 ]] && echo -ne "\n ret: $cntr ${spaceSTR:0:$((cntr--))} ${GREEN}$DEP${OFF}\tUsing the new xinclude file for PKG $DEP (to solve $PKG)"321 [[ "${VERBOSITY}" > 0 ]] && echo -ne "\n ret: $cntr${spaceSTR:0:$((cntr--))}${GREEN}$DEP${OFF} Using $DEP Xinc to solve $PKG" 335 322 set -e 336 323 337 324 # Include it when done 338 echo -e "\tUsing the new xinclude file for PKG $DEP (to solve $PKG)\n" >> depure.txt339 325 IFS=$'\x0A' 340 326 for line2 in `cat xincludes/$DEP.xinc` ; do … … 358 344 #------------------ 359 345 mv xincludes/$PKG.xinc.tmp xincludes/$PKG.xinc 360 echo -e "Using the new xinclude file for PKG $PKG" >> depure.txt361 346 IFS=$'\x0A' 362 347 for line in `cat xincludes/$PKG.xinc` ; do … … 367 352 echo -e "$line" >> $TARGET-index.xml.tmp 368 353 done 369 370 echo -e "\nEnd loop for PKG $PKG\n" >> depure.txt371 354 } -
BLFS/libs/func_parser
r1b99a8b rd0d9e90 23 23 24 24 local 25 echo -en "\ tGenerating $TARGET-index.xml ..."25 echo -en "\n\tGenerating $TARGET-index.xml ..." 26 26 27 27 #--------------------- … … 99 99 100 100 local filename # output filename 101 echo -en "\ tGenerating the HTML book for <$TARGET> from the xml files located in <$BLFS_XML>..."101 echo -en "\n\tGenerating <$TARGET> HTML book from <$BLFS_XML> xml files ..." 102 102 xsltproc --xinclude --nonet \ 103 103 --stringparam mail_server $MAIL_SERVER \ … … 139 139 echo -e "\n\tScripts generation depuration and errors:\n" >> xsltproc.log 140 140 141 echo -en "\tGenerating the build scripts ..."141 echo -en "\n\tGenerating the build scripts ..." 142 142 xsltproc --xinclude --nonet \ 143 143 -o ./scripts/ ../libs/scripts.xsl \ 144 144 $TARGET-index.xml >> xsltproc.log 2>&1 145 echo "done"145 echo -e "done\n" 146 146 # Make the scripts executable. 147 147 chmod -R +x scripts -
BLFS/libs/scripts.xsl
r1b99a8b rd0d9e90 84 84 85 85 <!-- Creating the scripts --> 86 <exsl:document href="{$order}- {$filename}" method="text">86 <exsl:document href="{$order}-z-{$filename}" method="text"> 87 87 <xsl:text>#!/bin/sh
set -e

</xsl:text> 88 88 <xsl:choose> … … 103 103 <!-- Clean-up --> 104 104 <xsl:text>cd ~/sources/$PKG_DIR
</xsl:text> 105 <xsl:text>rm -rf $UNPACKDIR 

</xsl:text>105 <xsl:text>rm -rf $UNPACKDIR unpacked

</xsl:text> 106 106 </xsl:when> 107 107 <!-- Non-package page --> … … 132 132 </xsl:when> 133 133 <xsl:when test="@role = 'installation'"> 134 <xsl:text>tar -xvf $PACKAGE > unpacked
</xsl:text> 135 <xsl:text>UNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
</xsl:text> 136 <xsl:text>cd $UNPACKDIR
</xsl:text> 134 <xsl:text> 135 if [[ -e unpacked ]] ; then 136 UNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'` 137 rm -rf $UNPACKDIR 138 fi 139 tar -xvf $PACKAGE > unpacked 140 UNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'` 141 cd $UNPACKDIR 142 </xsl:text> 137 143 <xsl:apply-templates select=".//screen | .//para/command"/> 138 144 <xsl:text>
</xsl:text> … … 305 311 <xsl:text> cp $SRC_ARCHIVE/$PACKAGE $PACKAGE
 else
</xsl:text> 306 312 <!-- The FTP_SERVER mirror --> 307 <xsl:text> wget $ FTP_SERVER/BLFS/conglomeration/$PKG_DIR/$PACKAGE</xsl:text>313 <xsl:text> wget ${FTP_SERVER}conglomeration/$PKG_DIR/$PACKAGE</xsl:text> 308 314 <!-- Upstream HTTP URL --> 309 315 <xsl:if test="string-length(ulink/@url) > '10' and
Note:
See TracChangeset
for help on using the changeset viewer.