Changeset d68eb1b for common


Ignore:
Timestamp:
01/12/2014 09:40:20 PM (10 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
2.4, ablfs-more, legacy, new_features, trunk
Children:
b97ed5b
Parents:
7735c7a
Message:

Major change to th scripts layout:

  • Do not put the chroot commands in $PROGNAME-commands, but rather in a separate directory chroot-scripts
  • Use the commands in the chroot-scripts directory to generate the CHROOT variables in Makefile
  • The commands are extracted to $PROGNAME-commands only if they do not have role="nodump attribute and they do not begin with "chroot" (for compatibility with previous books where chroot commands did not have the role="nodump" attribute.
Location:
common
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • common/libs/func_book_parser

    r7735c7a rd68eb1b  
    1717      lfs) svn_root="LFS" ;;
    1818      hlfs) svn_root="HLFS" ;;
    19       clfs*) svn_root="cross-lfs" ;;
     19      clfs*) ;;
    2020      *) echo "BOOK not defined in function <get_book>"
    2121          exit 1 ;;
     
    5757#----------------------------#
    5858
    59   # Check for libxslt instead of just letting the script hit 'xsltproc' and fail.
    60   test `type -p xsltproc` || eval "echo \"This feature requires libxslt.\"
    61   exit 1"
    62 
    6359  cd $JHALFSDIR
    6460  case $PROGNAME in
     
    6965  esac
    7066
    71   # Start clean
    72   if [ -d ${PROGNAME}-commands ]; then
    73     rm -rf ${PROGNAME}-commands
    74     mkdir -v ${PROGNAME}-commands
    75   fi
     67  # Clean
     68  rm -rf ${PROGNAME}-commands
     69
     70  # Extract the commands
    7671  echo -n "Extracting commands for"
    77 
    78   # Dump the commands in shell script form from the HLFS book.
    7972  case ${PROGNAME} in
    8073    clfs)
     
    149142                 -o ./${PROGNAME}-commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1
    150143      ;;
    151     *)  echo -n " ${L_arrow}${BOLD}${PROGNAME}${R_arrow} book invalid, terminate build... "
     144    *)  echo -n " ${L_arrow}${PROGNAME}${R_arrow} book invalid, terminate build... "
    152145        exit 1 ;;
    153146  esac
     
    160153  # Create the packages file. We need it for proper Makefile creation
    161154  create_package_list
     155  create_chroot_scripts
    162156
    163157  # Done. Moving on...
     
    196190  esac
    197191
    198   if [[ "${BLFS_TOOL}" = "y" ]] ; then
    199 (
    200 cat << EOF
    201 $LIBXML_PKG
    202 $LIBXSLT_PKG
    203 $TIDY_PKG
    204 $UNZIP_PKG
    205 $DBXML_PKG
    206 $DBXSL_PKG
    207 $LYNX_PKG
    208 $SUDO_PKG
    209 $WGET_PKG
    210 $SQLITE_PKG
    211 $APR_PKG
    212 $APR_U_PKG
    213 $SVN_PKG
    214 $GPM_PKG
    215 EOF
    216 ) >> pkg_tarball_list
    217   fi
    218 
    219192  echo "done"
    220193
    221194}
    222195
     196#----------------------------#
     197create_chroot_scripts() {      #
     198#----------------------------#
     199
     200  rm -rf chroot_scripts
     201  echo -n "Creating chroot commands scripts from $BOOK"
     202  if [ ! -z $ARCH ] ; then echo -n " $ARCH" ; fi
     203  echo -n "... "
     204  case ${PROGNAME} in
     205    clfs*)
     206      xsltproc --nonet --xinclude \
     207               -o chroot-scripts/ chroot.xsl \
     208               $BOOK/BOOK/${ARCH}-index.xml >> $LOGDIR/$LOG 2>&1
     209      ;;
     210    hlfs)
     211      xsltproc --nonet --xinclude \
     212               -o chroot-scripts/ chroot.xsl \
     213               $BOOK/index.xml >> $LOGDIR/$LOG 2>&1
     214      ;;
     215    lfs)
     216      xsltproc --nonet --xinclude \
     217               -o chroot-scripts/ chroot.xsl \
     218               $BOOK/chapter06/chapter06.xml >> $LOGDIR/$LOG 2>&1
     219      ;;
     220    *)
     221  esac
     222  echo "done"
     223
     224}
Note: See TracChangeset for help on using the changeset viewer.