home *** CD-ROM | disk | FTP | other *** search
- #! /bin/sh
- #
- # wrap - Combine a directory into a single tar package.
- #
- #ident "@(#)cvs/examples:$Name: $:$Id: wrap,v 1.1 1996/06/28 00:21:21 tom Exp $"
-
- # This script is always called with the current directory set to
- # where the file to be combined exists. but i may get called with a
- # path to where cvs first started executing. (this probably should be
- # fixed in cvs) so strip out all of the directory information.
- DIRNAME=`basename "$1"`
- #
- # Now tar up the directory but we now will only get a relative path
- # even if the user did a cvs commit . at the top.
- #
- gnutar --sparse -cf - "$DIRNAME" | gzip --no-name --best -c > "$2"
-