home *** CD-ROM | disk | FTP | other *** search
/ Peanuts NeXT Software Archives / Peanuts-Update.iso / NEXTSTEP / unix / developer / cvs.HOWTO.README / cvs.HOWTO / cvswrappers-HOWTO.1.1.rtfd / unwrap < prev    next >
Encoding:
Text File  |  1996-06-27  |  475 b   |  22 lines

  1. #! /bin/sh -e
  2. #
  3. #    unwrap - extract the combined package (created with wrap)
  4. #
  5. #ident    "@(#)cvs/examples:$Name:  $:$Id: unwrap,v 1.1 1996/06/28 00:21:20 tom Exp $"
  6.  
  7. # move the file to a new name with an extension
  8. rm -rf "$1".cvswrap
  9. mv "$1" "$1".cvswrap
  10.  
  11. # untar the file
  12.  
  13. if gzip -l "$1".cvswrap > /dev/null 2>&1
  14. then
  15.     gzcat -d "$1".cvswrap | gnutar --preserve --sparse -x -f -
  16. else
  17.     gnutar --preserve --sparse -x -f "$1".cvswrap
  18. fi
  19.  
  20. # remove the original
  21. rm -rf "$1".cvswrap
  22.