<!ELEMENT unpack (digest?, reference*, archive, destination)>
This element occurs in : Element : <alfs> | Element: <stage>
See also : Element : <archive> | Element: <destination> | Element: <digest> | Element: <reference>
The unpack element is one of the top-level operation elements. It is used to unpack an archive into a destination directory.
The reference child-element gives the URL of the archive; it is only used if the archive file is not available locally.
The digest child-element gives the digest of the archive, using the digest type specified in the type attribute. See Element: <digest>.
The archive child-element gives the name of the archive, and the destination child-element gives the name of the directory in which the archive is unpacked.
<unpack> <reference>ftp://ftp.gnu.org/gnu/gzip/gzip.1.2.4a.tar.gz</reference> <archive>/usr/src/lfs-packages/gzip.1.2.4a.tar.gz</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
wget -nc -O /usr/src/lfs-packages/gzip-1.2.4a.tar.gz ftp://ftp.gnu.org/gnu/gzip/gzip.1.2.4a.tar.gz
cd /usr/src
tar xzvf /usr/src/lfs-packages/gzip.1.2.4a.tar.gz