Changeset 92b7cb8 for common


Ignore:
Timestamp:
09/14/2013 10:13:04 AM (11 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
2.4, ablfs-more, legacy, new_features, trunk
Children:
038678f
Parents:
4b1dd33
Message:

Allows to use git for downloading the CLFS book
Adds .lzma as a possible extension for a tarball in urls.xsl

Location:
common/libs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • common/libs/func_book_parser

    r4b1dd33 r92b7cb8  
    1717      lfs) svn_root="LFS" ;;
    1818      hlfs) svn_root="HLFS" ;;
    19       clfs) svn_root="cross-lfs" ;;
    20       clfs2) svn_root="cross-lfs" ;;
    21       clfs3) svn_root="cross-lfs" ;;
     19      clfs*) svn_root="cross-lfs" ;;
    2220      *) echo "BOOK not defined in function <get_book>"
    2321          exit 1 ;;
     
    2624    # repo. If we've already extracted the commands, move on to getting the
    2725    # sources.
    28     if ! [ -d ${PROGNAME}-$LFSVRS ] || ! [ -d ${PROGNAME}-$LFSVRS/.svn ]; then
    29       svn co $SVN/${svn_root}/${TREE} ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1
     26    if [ $PROGNAME == "lfs" ] || [ $PROGNAME == "hlfs" ] && [ ! -d ${PROGNAME}-${LFSVRS}/.svn ]; then
     27        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        echo $TREE
     30        git clone $GIT ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1
     31        if [ ! $TREE == "development" ]; then
     32           cd ${PROGNAME}-$LFSVRS
     33           echo "Checking out $LFSVRS at $PWD in $TREE"
     34           git checkout ${TREE} >>$LOGDIR/$LOG 2>&1
     35        fi
    3036    else
    3137      cd ${PROGNAME}-$LFSVRS
    32       svn up >>$LOGDIR/$LOG 2>&1
     38      case $PROGNAME in
     39        clfs*)  git pull >>$LOGDIR/$LOG 2>&1 ;;
     40        lfs | hlfs) svn up >>$LOGDIR/$LOG 2>&1 ;;
     41        *) ;;
     42      esac
    3343    fi
    3444    echo -ne "done\n"
     
    4959  cd $JHALFSDIR
    5060  case $PROGNAME in
    51     clfs | clfs2 | clfs3 )
    52       VERSION=$(xmllint --noent $BOOK/prologue/$ARCH/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //'  -e 's/<\/.*//') ;;
     61    clfs*)
     62      VERSION=$(xmllint --noent BOOK/prologue/$ARCH/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //'  -e 's/<\/.*//') ;;
    5363    *)
    5464      VERSION=$(xmllint --noent $BOOK/prologue/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //'  -e 's/<\/.*//')  ;;
     
    7686                 --stringparam lang $LANG \
    7787                 --stringparam sparc $SPARC64_PROC \
    78                  -o ./${PROGNAME}-commands/ $XSL $BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
     88                 -o ./${PROGNAME}-commands/ $XSL $BOOK/BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
    7989      ;;
    8090
     
    8797                 --stringparam page $PAGE \
    8898                 --stringparam lang $LANG \
    89                  -o ./${PROGNAME}-commands/ $XSL $BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
     99                 -o ./${PROGNAME}-commands/ $XSL $BOOK/BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
    90100      ;;
    91101
     
    98108                 --stringparam page $PAGE \
    99109                 --stringparam lang $LANG \
    100                  -o ./${PROGNAME}-commands/ $XSL $BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
     110                 -o ./${PROGNAME}-commands/ $XSL $BOOK/BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
    101111      ;;
    102112
     
    164174  echo -n "... "
    165175  case ${PROGNAME} in
    166     clfs | clfs2 | clfs3 )
     176    clfs*)
    167177        xsltproc --nonet --xinclude -o pkg_tarball_list packages.xsl \
    168                  $BOOK/materials/${ARCH}-chapter.xml >>$LOGDIR/$LOG 2>&1
     178                 $BOOK/BOOK/materials/${ARCH}-chapter.xml >>$LOGDIR/$LOG 2>&1
    169179      ;;
    170180    hlfs)
     
    181191                 $BOOK/chapter03/chapter03.xml >>$LOGDIR/$LOG 2>&1
    182192      ;;
     193    *)
    183194  esac
    184195
  • common/libs/func_check_version.sh

    r4b1dd33 r92b7cb8  
    9090
    9191  # Maybe we should check xsltproc first?
    92   eval $(xsltproc $COMMON_DIR/hostreqs.xsl $BOOK/prologue/hostreqs.xml)
     92    case $PROGNAME in
     93      clfs | clfs2 | clfs3) HOSTREQS="BOOK/prologue/common/hostreqs.xml" ;;
     94      *) HOSTREQS="prologue/hostreqs.xml" ;;
     95    esac
     96
     97  eval $(xsltproc $COMMON_DIR/hostreqs.xsl $BOOK/$HOSTREQS)
    9398  # Avoid translation of version strings
    9499  local LC_ALL=C
Note: See TracChangeset for help on using the changeset viewer.