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 element download is one of the top-level operation elements. It is used to specify one or several URLs from which a file can be downloaded, and optionally a digest to check that the file being downloaded is the right one.

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

The sub-element url 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 sub-element destination contains the path of the directory into which the download should be performed.

The sub-element digest contains the value with 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 present.

Examples

<download>
        <file>gzip-1.2.4a.tar.gz</file>
        <url>ftp://gnu.org/</url>
        <destination>/tmp/</destination>
        <digest>924e6a05e52715dc0f96385b35f2f680</digest>
</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