Changeset c0bc66d


Ignore:
Timestamp:
08/13/2006 11:58:59 AM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
Children:
d3ce173
Parents:
8cb88dc
Message:

Added option to not use sudo.

Location:
BLFS
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • BLFS/blfs-parser.sh

    r8cb88dc rc0bc66d  
    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/func_parser

    r8cb88dc rc0bc66d  
    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

    r8cb88dc rc0bc66d  
    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>
Note: See TracChangeset for help on using the changeset viewer.