Changeset 4954fdf


Ignore:
Timestamp:
06/29/2017 08:22:13 AM (7 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
2.4
Children:
e218205
Parents:
b37d5e3
Message:

Use BUILD_DIR and SRC_DIR in bootscripts/systemd-units download instructions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BLFS/xsl/scripts.xsl

    rb37d5e3 r4954fdf  
    427427    <xsl:param name="bootpkg" select="'bootscripts'"/>
    428428    <xsl:param name="url" select="''"/>
    429     <xsl:text>[[ ! -d $SRC_DIR/blfs-</xsl:text>
    430     <xsl:copy-of select="$bootpkg"/>
    431     <xsl:text> ]] &amp;&amp; mkdir $SRC_DIR/blfs-</xsl:text>
     429    <xsl:text>BOOTPKG_DIR=blfs-</xsl:text>
    432430    <xsl:copy-of select="$bootpkg"/>
    433431    <xsl:text>
    434 pushd $SRC_DIR/blfs-</xsl:text>
    435     <xsl:copy-of select="$bootpkg"/>
    436     <xsl:text>
     432BOOTSRC_DIR=${SRC_ARCHIVE}${SRC_SUBDIRS:+/${BOOTPKG_DIR}}
     433BOOTBUILD_DIR=${BUILD_ROOT}${BUILD_SUBDIRS:+/${BOOTPKG_DIR}}
     434mkdir -p $BOOTSRC_DIR
     435mkdir -p $BOOTBUILD_DIR
     436
     437pushd $BOOTSRC_DIR
    437438URL=</xsl:text>
    438439      <xsl:value-of select="$url"/>
     
    440441BOOTPACKG=$(basename $URL)
    441442if [[ ! -f $BOOTPACKG ]] ; then
    442   if [[ -f $SRC_ARCHIVE/$PKG_DIR/$BOOTPACKG ]] ; then
    443     cp $SRC_ARCHIVE/$PKG_DIR/$BOOTPACKG $BOOTPACKG
    444   elif [[ -f $SRC_ARCHIVE/$BOOTPACKG ]] ; then
     443  if [[ -f $SRC_ARCHIVE/$BOOTPACKG ]] ; then
    445444    cp $SRC_ARCHIVE/$BOOTPACKG $BOOTPACKG
    446445  else
    447446    wget -T 30 -t 5 $URL
    448     cp $BOOTPACKG $SRC_ARCHIVE
    449447  fi
    450   rm -f unpacked
     448  rm -f $BOOTBUILD_DIR/unpacked
    451449fi
    452450
     451cd $BOOTBUILD_DIR
    453452if [[ -e unpacked ]] ; then
    454453  BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
    455454  if ! [[ -d $BOOTUNPACKDIR ]]; then
    456     rm unpacked
    457     tar -xvf $BOOTPACKG > unpacked
     455    tar -xvf $BOOTSRC_DIR/$BOOTPACKG > unpacked
    458456    BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
    459457  fi
    460458else
    461   tar -xvf $BOOTPACKG > unpacked
     459  tar -xvf $BOOTSRC_DIR/$BOOTPACKG > unpacked
    462460  BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
    463461fi
Note: See TracChangeset for help on using the changeset viewer.