Ignore:
Timestamp:
05/28/2016 10:00:30 AM (8 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
2.4, ablfs-more, legacy, trunk
Children:
878a5a0
Parents:
061d54f
Message:

Adaptation for merged LFS books. A few typos with no consequence are corrected too.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/libs/func_book_parser

    r061d54f rc9598f2  
    99
    1010  if [ -z $WORKING_COPY ] ; then
    11     # Check for Subversion instead of just letting the script hit 'svn' and fail.
     11# Check for Subversion instead of just letting the script hit 'svn' and fail.
    1212    test `type -p svn` || eval "echo \"This feature requires Subversion.\"
    1313    exit 1"
     
    2424    # repo. If we've already extracted the commands, move on to getting the
    2525    # sources.
    26     if [ $PROGNAME == "lfs" ] || [ $PROGNAME == "hlfs" ] && [ ! -d ${PROGNAME}-${LFSVRS}/.svn ]; then
     26    if [ $PROGNAME == "lfs" ] || [ $PROGNAME == "hlfs" ] &&
     27                                 [ ! -d ${PROGNAME}-${LFSVRS}/.svn ]; then
    2728        svn co $SVN/${svn_root}/${TREE} ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1
    28     elif [ $PROGNAME == "clfs" ]  || [ $PROGNAME == "clfs2" ] || [ $PROGNAME == "clfs3" ] && [ ! -d ${PROGNAME}-${LFSVRS}/.git ]; then
     29    elif [ $PROGNAME == "clfs" ]  || [ $PROGNAME == "clfs2" ] ||
     30         [ $PROGNAME == "clfs3" ] && [ ! -d ${PROGNAME}-${LFSVRS}/.git ]; then
    2931        echo $TREE
    3032        git clone $GIT ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1
     
    6163    clfs*)
    6264      VERSION=$(xmllint --noent $BOOK/BOOK/prologue/$ARCH/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //'  -e 's/<\/.*//') ;;
     65    lfs)
     66      if [ "$INITSYS" = "sysv" ] ; then
     67        VERSION=$(grep 'ENTITY version ' $BOOK/general.ent| cut -d\" -f2)
     68      else
     69        VERSION=$(grep 'ENTITY versiond' $BOOK/general.ent| cut -d\" -f2)
     70      fi
     71      ;;
    6372    *)
    6473      VERSION=$(xmllint --noent $BOOK/prologue/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //'  -e 's/<\/.*//')  ;;
     
    7382    clfs)
    7483        echo -n " ${L_arrow}${BOLD}$ARCH${R_arrow} target architecture... "
    75         xsltproc --nonet \
    76                  --xinclude \
    77                  --stringparam method $METHOD \
    78                  --stringparam testsuite $TEST \
     84        xsltproc --nonet                                 \
     85                 --xinclude                              \
     86                 --stringparam method $METHOD            \
     87                 --stringparam testsuite $TEST           \
    7988                 --stringparam bomb-testsuite $BOMB_TEST \
    80                  --stringparam vim-lang $VIMLANG \
    81                  --stringparam timezone $TIMEZONE \
    82                  --stringparam page $PAGE \
    83                  --stringparam lang $LANG \
    84                  --stringparam sparc $SPARC64_PROC \
    85                  --stringparam x86 $TARGET \
    86                  --stringparam mips $TARGET \
    87                  -o ./${PROGNAME}-commands/ $XSL $BOOK/BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
     89                 --stringparam vim-lang $VIMLANG         \
     90                 --stringparam timezone $TIMEZONE        \
     91                 --stringparam page $PAGE                \
     92                 --stringparam lang $LANG                \
     93                 --stringparam sparc $SPARC64_PROC       \
     94                 --stringparam x86 $TARGET               \
     95                 --stringparam mips $TARGET              \
     96                 -o ./${PROGNAME}-commands/              \
     97                 $XSL                                    \
     98                 $BOOK/BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
    8899      ;;
    89100
    90101    clfs2)
    91102        echo -n " ${L_arrow}${BOLD}$ARCH${R_arrow} target architecture... "
    92         xsltproc --nonet \
    93                  --xinclude \
    94                  --stringparam vim-lang $VIMLANG \
     103        xsltproc --nonet                          \
     104                 --xinclude                       \
     105                 --stringparam vim-lang $VIMLANG  \
    95106                 --stringparam timezone $TIMEZONE \
    96                  --stringparam page $PAGE \
    97                  --stringparam lang $LANG \
    98                  -o ./${PROGNAME}-commands/ $XSL $BOOK/BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
     107                 --stringparam page $PAGE         \
     108                 --stringparam lang $LANG         \
     109                 --output ./${PROGNAME}-commands/ \
     110                 $XSL                             \
     111                 $BOOK/BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
    99112      ;;
    100113
    101114    clfs3)
    102115        echo -n " ${L_arrow}${BOLD}$ARCH${R_arrow} target architecture... "
    103         xsltproc --nonet \
    104                  --xinclude \
    105                  --stringparam endian x$ENDIAN \
     116        xsltproc --nonet                          \
     117                 --xinclude                       \
     118                 --stringparam endian x$ENDIAN    \
    106119                 --stringparam timezone $TIMEZONE \
    107                  --stringparam page $PAGE \
    108                  --stringparam lang $LANG \
    109                  -o ./${PROGNAME}-commands/ $XSL $BOOK/BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
     120                 --stringparam page $PAGE         \
     121                 --stringparam lang $LANG         \
     122                 --output ./${PROGNAME}-commands/ \
     123                 $XSL                             \
     124                 $BOOK/BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
    110125      ;;
    111126
    112127    hlfs)
    113128        echo -n " ${L_arrow}${BOLD}$MODEL + $KERNEL${R_arrow} HLFS flavour... "
    114         xsltproc --nonet \
    115                  --xinclude \
    116                  --stringparam model $MODEL \
    117                  --stringparam kernel $KERNEL \
    118                  --stringparam testsuite $TEST \
    119                  --stringparam bomb-testsuite $BOMB_TEST \
    120                  --stringparam features x$SSP$ASLR$PAX$HARDENED_TMP$WARNINGS$MISC$BLOWFISH \
    121                  --stringparam timezone $TIMEZONE \
    122                  --stringparam page $PAGE \
    123                  --stringparam lang $LANG \
    124                  --stringparam grsecurity_host $GRSECURITY_HOST \
    125                  -o ./${PROGNAME}-commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1
     129        xsltproc --nonet                                                \
     130                 --xinclude                                             \
     131                 --stringparam model $MODEL                             \
     132                 --stringparam kernel $KERNEL                           \
     133                 --stringparam testsuite $TEST                          \
     134                 --stringparam bomb-testsuite $BOMB_TEST                \
     135                 --stringparam features                                 \
     136                     x$SSP$ASLR$PAX$HARDENED_TMP$WARNINGS$MISC$BLOWFISH \
     137                 --stringparam timezone $TIMEZONE                       \
     138                 --stringparam page $PAGE                               \
     139                 --stringparam lang $LANG                               \
     140                 --stringparam grsecurity_host $GRSECURITY_HOST         \
     141                 --output ./${PROGNAME}-commands/                       \
     142                 $XSL                                                   \
     143                 $BOOK/index.xml >>$LOGDIR/$LOG 2>&1
    126144      ;;
    127145    lfs)
     
    132150        fi
    133151        popd > /dev/null
    134         xsltproc --nonet \
    135                  --xinclude \
    136                  --stringparam testsuite $TEST \
    137                  --stringparam bomb-testsuite $BOMB_TEST \
    138                  --stringparam vim-lang $VIMLANG \
    139                  --stringparam full-locale $FULL_LOCALE \
    140                  --stringparam timezone $TIMEZONE \
    141                  --stringparam page $PAGE \
    142                  --stringparam lang $LANG \
    143                  --stringparam pkgmngt $PKGMNGT \
    144                  -o ./${PROGNAME}-commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1
     152
     153        xsltproc --nonet                                 \
     154                 --xinclude                              \
     155                 --output /tmp/lfs-full.xml              \
     156                 --stringparam profile.revision $INITSYS \
     157                 $BOOK/stylesheets/lfs-xsl/profile.xsl   \
     158                 $BOOK/index.xml
     159
     160        xsltproc --nonet                                   \
     161                 --stringparam testsuite      $TEST        \
     162                 --stringparam bomb-testsuite $BOMB_TEST   \
     163                 --stringparam vim-lang       $VIMLANG     \
     164                 --stringparam full-locale    $FULL_LOCALE \
     165                 --stringparam timezone       $TIMEZONE    \
     166                 --stringparam page           $PAGE        \
     167                 --stringparam lang           $LANG        \
     168                 --stringparam pkgmngt        $PKGMNGT     \
     169                 --output ./${PROGNAME}-commands/          \
     170                 $XSL                                      \
     171                 /tmp/lfs-full.xml >>$LOGDIR/$LOG 2>&1
     172
     173        rm /tmp/lfs-full.xml
    145174      ;;
    146175    *)  echo -n " ${L_arrow}${PROGNAME}${R_arrow} book invalid, terminate build... "
     
    173202  case ${PROGNAME} in
    174203    clfs*)
    175         xsltproc --nonet --xinclude -o pkg_tarball_list packages.xsl \
     204        xsltproc --nonet --xinclude  \
     205                 -o pkg_tarball_list \
     206                 packages.xsl        \
    176207                 $BOOK/BOOK/materials/${ARCH}-chapter.xml >>$LOGDIR/$LOG 2>&1
    177208      ;;
    178209    hlfs)
    179         xsltproc --nonet --xinclude \
    180                  --stringparam model $MODEL \
     210        xsltproc --nonet --xinclude           \
     211                 --stringparam model $MODEL   \
    181212                 --stringparam kernel $KERNEL \
    182                   -o pkg_tarball_list packages.xsl \
     213                 --output pkg_tarball_list    \
     214                 packages.xsl                 \
    183215                 $BOOK/chapter04/chapter04.xml >>$LOGDIR/$LOG 2>&1
    184216      ;;
    185217    lfs)
    186         xsltproc --nonet --xinclude \
    187                  --stringparam pkgmngt $PKGMNGT \
    188                   -o pkg_tarball_list packages.xsl \
     218        xsltproc --nonet --xinclude              \
     219                 --stringparam pkgmngt $PKGMNGT  \
     220                 --stringparam revision $INITSYS \
     221                 --output pkg_tarball_list       \
     222                 packages.xsl                    \
    189223                 $BOOK/chapter03/chapter03.xml >>$LOGDIR/$LOG 2>&1
    190224      ;;
Note: See TracChangeset for help on using the changeset viewer.