Element: <download>

Syntax

        <!ELEMENT download       (file, url*, destination, digest?)>

This element occurs in : Element : <alfs> | Element: <stage>

See also : Element: <file> | Element: <url> | Element: <destination> | Element: <digest>

Description

The download element is one of the top-level operation elements. It is used to specify one or several URLs from which a file can be downloaded; optionally a digest to check that the file being downloaded is the right one and was downloaded correctly (not corrupted or truncated).

The file child-element contains the name of the file to be downloaded.

The url child-element contains the url of the directory from which the download is performed. It should be terminated by a slash [ / ]. More precisely, the actual URL used for the download is the catenation of the content of the url element with the content of the file element.

The destination child-element contains the path of the directory into which the download should be performed.

The digest child-element contains the value to which the digest computed from the dowloaded file will be compared. See Element: <digest>.

If the file is already present in the destination directory, no download is performed but the digest is checked if specified.

Examples

<download>
        <file>gzip-1.2.4a.tar.gz</file>
        <url>ftp://gnu.org/</url>
        <destination>/tmp/</destination>
</download>

The equivalent bash script is :

echo Executing 'download'
wget -nc -O /tmp/gzip-1.2.4a.tar.gz ftp://gnu.org/gzip-1.2.4a.tar.gz