Changeset 973c767


Ignore:
Timestamp:
06/29/2017 08:25:01 AM (7 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
ablfs-more, legacy, trunk
Children:
6990d80
Parents:
59bb076
Message:

Use BUILD_DIR and SRC_DIR in bootscripts/systemd-units download instructions
(cherry picked from r3967 in 2.4 branch)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BLFS/xsl/scripts.xsl

    r59bb076 r973c767  
    452452    <xsl:param name="bootpkg" select="'bootscripts'"/>
    453453    <xsl:param name="url" select="''"/>
    454     <xsl:text>[[ ! -d $SRC_DIR/blfs-</xsl:text>
    455     <xsl:copy-of select="$bootpkg"/>
    456     <xsl:text> ]] &amp;&amp; mkdir $SRC_DIR/blfs-</xsl:text>
     454    <xsl:text>BOOTPKG_DIR=blfs-</xsl:text>
    457455    <xsl:copy-of select="$bootpkg"/>
    458456    <xsl:text>
    459 pushd $SRC_DIR/blfs-</xsl:text>
    460     <xsl:copy-of select="$bootpkg"/>
    461     <xsl:text>
     457BOOTSRC_DIR=${SRC_ARCHIVE}${SRC_SUBDIRS:+/${BOOTPKG_DIR}}
     458BOOTBUILD_DIR=${BUILD_ROOT}${BUILD_SUBDIRS:+/${BOOTPKG_DIR}}
     459mkdir -p $BOOTSRC_DIR
     460mkdir -p $BOOTBUILD_DIR
     461
     462pushd $BOOTSRC_DIR
    462463URL=</xsl:text>
    463464      <xsl:value-of select="$url"/>
     
    465466BOOTPACKG=$(basename $URL)
    466467if [[ ! -f $BOOTPACKG ]] ; then
    467   if [[ -f $SRC_ARCHIVE/$PKG_DIR/$BOOTPACKG ]] ; then
    468     cp $SRC_ARCHIVE/$PKG_DIR/$BOOTPACKG $BOOTPACKG
    469   elif [[ -f $SRC_ARCHIVE/$BOOTPACKG ]] ; then
     468  if [[ -f $SRC_ARCHIVE/$BOOTPACKG ]] ; then
    470469    cp $SRC_ARCHIVE/$BOOTPACKG $BOOTPACKG
    471470  else
    472471    wget -T 30 -t 5 $URL
    473     cp $BOOTPACKG $SRC_ARCHIVE
    474472  fi
    475   rm -f unpacked
     473  rm -f $BOOTBUILD_DIR/unpacked
    476474fi
    477475
     476cd $BOOTBUILD_DIR
    478477if [[ -e unpacked ]] ; then
    479478  BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
    480479  if ! [[ -d $BOOTUNPACKDIR ]]; then
    481     rm unpacked
    482     tar -xvf $BOOTPACKG > unpacked
     480    tar -xvf $BOOTSRC_DIR/$BOOTPACKG > unpacked
    483481    BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
    484482  fi
    485483else
    486   tar -xvf $BOOTPACKG > unpacked
     484  tar -xvf $BOOTSRC_DIR/$BOOTPACKG > unpacked
    487485  BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
    488486fi
Note: See TracChangeset for help on using the changeset viewer.