Use BUILD_DIR and SRC_DIR in bootscripts/systemd-units download instructions
This commit is contained in:
parent
b37d5e3f0a
commit
4954fdff01
1 changed files with 12 additions and 14 deletions
|
@ -426,39 +426,37 @@ fi
|
||||||
<xsl:template name="set-bootpkg-dir">
|
<xsl:template name="set-bootpkg-dir">
|
||||||
<xsl:param name="bootpkg" select="'bootscripts'"/>
|
<xsl:param name="bootpkg" select="'bootscripts'"/>
|
||||||
<xsl:param name="url" select="''"/>
|
<xsl:param name="url" select="''"/>
|
||||||
<xsl:text>[[ ! -d $SRC_DIR/blfs-</xsl:text>
|
<xsl:text>BOOTPKG_DIR=blfs-</xsl:text>
|
||||||
<xsl:copy-of select="$bootpkg"/>
|
|
||||||
<xsl:text> ]] && mkdir $SRC_DIR/blfs-</xsl:text>
|
|
||||||
<xsl:copy-of select="$bootpkg"/>
|
|
||||||
<xsl:text>
|
|
||||||
pushd $SRC_DIR/blfs-</xsl:text>
|
|
||||||
<xsl:copy-of select="$bootpkg"/>
|
<xsl:copy-of select="$bootpkg"/>
|
||||||
<xsl:text>
|
<xsl:text>
|
||||||
|
BOOTSRC_DIR=${SRC_ARCHIVE}${SRC_SUBDIRS:+/${BOOTPKG_DIR}}
|
||||||
|
BOOTBUILD_DIR=${BUILD_ROOT}${BUILD_SUBDIRS:+/${BOOTPKG_DIR}}
|
||||||
|
mkdir -p $BOOTSRC_DIR
|
||||||
|
mkdir -p $BOOTBUILD_DIR
|
||||||
|
|
||||||
|
pushd $BOOTSRC_DIR
|
||||||
URL=</xsl:text>
|
URL=</xsl:text>
|
||||||
<xsl:value-of select="$url"/>
|
<xsl:value-of select="$url"/>
|
||||||
<xsl:text>
|
<xsl:text>
|
||||||
BOOTPACKG=$(basename $URL)
|
BOOTPACKG=$(basename $URL)
|
||||||
if [[ ! -f $BOOTPACKG ]] ; then
|
if [[ ! -f $BOOTPACKG ]] ; then
|
||||||
if [[ -f $SRC_ARCHIVE/$PKG_DIR/$BOOTPACKG ]] ; then
|
if [[ -f $SRC_ARCHIVE/$BOOTPACKG ]] ; then
|
||||||
cp $SRC_ARCHIVE/$PKG_DIR/$BOOTPACKG $BOOTPACKG
|
|
||||||
elif [[ -f $SRC_ARCHIVE/$BOOTPACKG ]] ; then
|
|
||||||
cp $SRC_ARCHIVE/$BOOTPACKG $BOOTPACKG
|
cp $SRC_ARCHIVE/$BOOTPACKG $BOOTPACKG
|
||||||
else
|
else
|
||||||
wget -T 30 -t 5 $URL
|
wget -T 30 -t 5 $URL
|
||||||
cp $BOOTPACKG $SRC_ARCHIVE
|
|
||||||
fi
|
fi
|
||||||
rm -f unpacked
|
rm -f $BOOTBUILD_DIR/unpacked
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
cd $BOOTBUILD_DIR
|
||||||
if [[ -e unpacked ]] ; then
|
if [[ -e unpacked ]] ; then
|
||||||
BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
|
BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
|
||||||
if ! [[ -d $BOOTUNPACKDIR ]]; then
|
if ! [[ -d $BOOTUNPACKDIR ]]; then
|
||||||
rm unpacked
|
tar -xvf $BOOTSRC_DIR/$BOOTPACKG > unpacked
|
||||||
tar -xvf $BOOTPACKG > unpacked
|
|
||||||
BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
|
BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
tar -xvf $BOOTPACKG > unpacked
|
tar -xvf $BOOTSRC_DIR/$BOOTPACKG > unpacked
|
||||||
BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
|
BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
|
||||||
fi
|
fi
|
||||||
cd $BOOTUNPACKDIR
|
cd $BOOTUNPACKDIR
|
||||||
|
|
Reference in a new issue