# -*- tcl -*-
# --------------------------------------------------
# (C) 1997	Andreas Kupries <a.kupries@westend.com>
#
# CVS:	$Id: pack_tar,v 1.4 1998/06/02 16:59:14 aku Exp $
#
# @c Unix packer plugins. Generate tar compressed archives.
# @s Packer to generate compressed archives.
# @i packer, tar, compression
# --------------------------------------------------

::makedist::packer tgz "Tar+Gzip" tar.gz {
    # @c Packs the named <a module> via 'tar'. The archive is compressed
    # @c afterward, by 'gzip'.
    #
    # @a module: name of the module (= directory) to be packed.
    # @a module:
    #
    # @n Assumes that the working directory is set to be the build directory.
    # @n The commands 'tar' and 'gzip' have to be reachable via PATH.

    exec tar cf - $module | gzip --best > ${module}.tar.gz
    return
}



::makedist::packer tz "Tar+Compress" tar.Z {
    # @c Packs the named <a module> via 'tar'. The archive is compressed
    # @c afterward, by 'compress'.
    #
    # @a module: name of the module (= directory) to be packed.
    # @a module:
    #
    # @n Assumes that the working directory is set to be the build directory.
    # @n The commands 'tar' and 'compress' have to be reachable via path.

    exec tar cf - $module | compress > ${module}.tar.Z
    return
}
