Changeset 00f4966


Ignore:
Timestamp:
08/13/2006 06:24:16 PM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
experimental
Children:
2fedf49
Parents:
d0d9e90
Message:

Merged r2936:2940 from trunk

Files:
2 added
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • BLFS/blfs-parser.sh

    rd0d9e90 r00f4966  
    1111
    1212# Grab and name the command line options
    13     optTARGET=$1
    14 optDEPENDENCY=$2
     13    optTARGET=$1  # Package target
     14optDEPENDENCY=$2  # Dependencies level, 1/2/3
     15         SUDO=$3  # Build as user (y) or as root (n)
     16
     17[[ -z $SUDO ]] && SUDO=y
    1518
    1619
     
    114117generate_TARGET_xml
    115118generate_target_book
    116 create_build_scripts
     119create_build_scripts "${SUDO}"
  • BLFS/libs/book.xsl

    rd0d9e90 r00f4966  
    77<!-- $Id$ -->
    88
    9   <!-- NOTE: the base dir (blfs-xml) must be changed to FAKEDIR on the
    10   final version and set it to the proper dir via a sed in ./blfs -->
     9  <!-- NOTE: the base dir (blfs-xml) is set to the proper dir
     10  via a sed in ./blfs -->
    1111  <xsl:import href="../blfs-xml/stylesheets/blfs-chunked.xsl"/>
    1212
  • BLFS/libs/func_parser

    rd0d9e90 r00f4966  
    127127: <<inline_doc
    128128    function:   Create shell scripts of the requested TARGET.
    129     input vars: nothing
     129    input vars: $1 use sudo n/y
    130130    externals:  TARGET
    131131    modifies:   nothing
     
    141141  echo -en "\n\tGenerating the build scripts ..."
    142142  xsltproc --xinclude --nonet \
     143           --stringparam sudo $SUDO \
    143144           -o ./scripts/ ../libs/scripts.xsl \
    144145           $TARGET-index.xml >> xsltproc.log 2>&1
  • BLFS/libs/scripts.xsl

    rd0d9e90 r00f4966  
    99
    1010<!-- XSLT stylesheet to create shell scripts from "linear build" BLFS books. -->
     11
     12  <!-- Build as user (y) or as root (n)? -->
     13  <xsl:param name="sudo" select="y"/>
    1114
    1215  <xsl:template match="/">
     
    345348  <xsl:template match="screen">
    346349    <xsl:if test="child::* = userinput and not(@role = 'nodump')">
    347       <xsl:if test="@role = 'root'">
     350      <xsl:if test="@role = 'root' and $sudo = 'y'">
    348351        <xsl:text>sudo sh -c "</xsl:text>
    349352      </xsl:if>
    350353      <xsl:apply-templates select="userinput"/>
    351       <xsl:if test="@role = 'root'">
     354      <xsl:if test="@role = 'root' and $sudo = 'y'">
    352355        <xsl:text>"</xsl:text>
    353356      </xsl:if>
  • Config.in

    rd0d9e90 r00f4966  
    2323                        bool "Hardened Linux From Scratch"
    2424
    25 #               config  BOOK_BLFS
    26 #                       bool "Beyond Linux From Scratch"
     25                config  BOOK_BLFS
     26                        bool "Beyond Linux From Scratch"
    2727        endchoice
    2828
     
    3434#               default "./clfs3"       if BOOK_CLFS3
    3535                default "./hlfs"        if BOOK_HLFS
    36 #               default "./blfs"        if BOOK_BLFS
     36                default "./blfs"        if BOOK_BLFS
    3737        #--- End BOOK/script
    3838
     
    4848                config  WORKING_COPY
    4949                        bool    "Working Copy"
     50                        depends on !BOOK_BLFS
    5051                        help
    5152                                #-- A local working copy
     
    278279        #--- End HLFS specific params
    279280
     281        #--- BLFS specific params
     282        config  BLFS_ROOT
     283                string "Directory root"
     284                default "$HOME/blfs_root"
     285                depends on BOOK_BLFS
     286                help
     287                        #-- Full path to the directory where all required
     288                        #   files and scripts will be stored.
     289
     290        config  BLFS_XML
     291                string "BLFS sources directory"
     292                default "blfs-xml"
     293                depends on BOOK_BLFS
     294                help
     295                        #-- The directory name where BLFS book sources
     296                        #   will be checkout.
     297        #--- End BLFS specific params
     298
    280299#--- End BOOK Settings
    281300endmenu
    282301
    283302menu "--- General Settings"
     303        depends on !BOOK_BLFS
    284304
    285305        #--- Set User Account
     
    384404
    385405menu "--- Build Settings"
     406        depends on !BOOK_BLFS
    386407
    387408        #--- Test Suites
     
    550571
    551572menu "--- Advanced Features"
     573        depends on !BOOK_BLFS
    552574
    553575        config  REPORT
  • blfs

    rd0d9e90 r00f4966  
    11#!/bin/bash
     2# $Id$
     3
    24set -e
    35
    4 echo -e "\n  BLFS support has been dissabled for now.\n"
    56
    6 exit 0
     7#>>>>>>>>>>>>>>>ERROR TRAPPING >>>>>>>>>>>>>>>>>>>>
     8#-----------------------#
     9simple_error() {        # Basic error trap.... JUST DIE
     10#-----------------------#
     11  # If +e then disable text output
     12  if [[ "$-" =~ "e" ]]; then
     13    echo -e "\n${RED}ERROR:${GREEN} basic error trapped!${OFF}\n" >&2
     14  fi
     15}
     16
     17see_ya() {
     18    echo -e "\n\t${BOLD}Goodbye and thank you for choosing ${L_arrow}jhalfs${R_arrow}\n"
     19}
     20##### Simple error TRAPS
     21# ctrl-c   SIGINT
     22# ctrl-y
     23# ctrl-z   SIGTSTP
     24# SIGHUP   1 HANGUP
     25# SIGINT   2 INTRERRUPT FROM KEYBOARD Ctrl-C
     26# SIGQUIT  3
     27# SIGKILL  9 KILL
     28# SIGTERM 15 TERMINATION
     29# SIGSTOP 17,18,23 STOP THE PROCESS
     30#####
     31set -e
     32trap see_ya 0
     33trap simple_error ERR
     34trap 'echo -e "\n\n${RED}INTERRUPT${OFF} trapped\n" &&  exit 2'  1 2 3 15 17 18 23
     35#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
     36
     37VERBOSITY=1
     38
     39[[ $VERBOSITY > 0 ]] && echo -n "Loading config params from <configuration>..."
     40source configuration
     41[[ $? > 0 ]] && echo "file:configuration did not load.." && exit 1
     42[[ $VERBOSITY > 0 ]] && echo "OK"
     43
     44[[ -z $BOOK_BLFS ]] && echo -e "\nNo BLFS configuration found. Please configure it." && exit 1
     45
     46TREE=trunk/BOOK
     47
     48if [[ ! -z ${BRANCH_ID} ]]; then
     49  case $BRANCH_ID in
     50    dev* | SVN | trunk )  TREE=trunk/BOOK ;;
     51              branch-* )  TREE=branches/${BRANCH_ID#branch-}/BOOK ;;
     52                     * )  TREE=tags/${BRANCH_ID}/BOOK ;;
     53  esac
     54fi
     55
     56[[ ! -d $BLFS_ROOT ]] && mkdir -p $BLFS_ROOT
     57
     58cp -r BLFS/* $BLFS_ROOT
     59cp common/progress_bar.sh $BLFS_ROOT
     60# cp -r menu $BLFS_ROOT
     61
     62cd $BLFS_ROOT
     63
     64sed -i 's,blfs-xml,'$BLFS_XML',' update_book.sh
     65sed -i 's,blfs-xml,'$BLFS_XML',' libs/book.xsl
     66
     67./update_book.sh $BLFS_XML get $TREE
     68# make
     69
Note: See TracChangeset for help on using the changeset viewer.