Element: <reference>

Syntax

<!ELEMENT reference      (#PCDATA)>

This element occurs in : Element: <unpack>

Description

The reference element is used to specify the URL of the reference archive to download if the local copy is not available.

Examples

<unpack>
        <reference>ftp://ftp.gnu.org/gnu/gzip/gzip.1.2.4a.tar.gz</reference>
        <archive>/usr/src/lfs-packages/gzip.1.2.4a</archive>
        <destination>/usr/src</destination>
</unpack>

The equivalent bash script is :

        echo Unpacking /usr/src/lfs-packages/gzip.1.2.4a.tar.gz into /usr/src
[[ ! -f /usr/src/lfs-packages/gzip.1.2.4a.tar.gz ]] &&
  echo Retrieving  ftp://ftp.gnu.org/gnu/gzip/gzip.1.2.4a.tar.gz
[[ ! -f /usr/src/lfs-packages/gzip.1.2.4a.tar.gz ]] &&
  wget -O /usr/src/lfs-packages/gzip.1.2.4a.tar.gz ftp://ftp.gnu.org/gnu/gzip/gzip.1.2.4a.tar.gz
[[ ! -f /usr/src/lfs-packages/gzip.1.2.4a.tar.gz ]] &&
  echo Archive does not exist && exit 3

cd /usr/src
tar xzvf /usr/src/lfs-packages/gzip.1.2.4a.tar.gz