Element: <reference>

Syntax


<!ELEMENT reference      (#PCDATA)>

This element occurs in the element unpack.

Description

The element reference 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 :


cho 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