Home | History | Annotate | Download | only in pack
      1 // Copyright 2014 The Go Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style
      3 // license that can be found in the LICENSE file.
      4 
      5 /*
      6 
      7 Pack is a simple version of the traditional Unix ar tool.
      8 It implements only the operations needed by Go.
      9 
     10 Usage:
     11 	go tool pack op file.a [name...]
     12 
     13 Pack applies the operation to the archive, using the names as arguments to the operation.
     14 
     15 The operation op is given by one of these letters:
     16 
     17 	c	append files (from the file system) to a new archive
     18 	p	print files from the archive
     19 	r	append files (from the file system) to the archive
     20 	t	list files from the archive
     21 	x	extract files from the archive
     22 
     23 The archive argument to the c command must be non-existent or a
     24 valid archive file, which will be cleared before adding new entries. It
     25 is an error if the file exists but is not an archive.
     26 
     27 For the p, t, and x commands, listing no names on the command line
     28 causes the operation to apply to all files in the archive.
     29 
     30 In contrast to Unix ar, the r operation always appends to the archive,
     31 even if a file with the given name already exists in the archive. In this way
     32 pack's r operation is more like Unix ar's rq operation.
     33 
     34 Adding the letter v to an operation, as in pv or rv, enables verbose operation:
     35 For the c and r commands, names are printed as files are added.
     36 For the p command, each file is prefixed by the name on a line by itself.
     37 For the t command, the listing includes additional file metadata.
     38 For the x command, names are printed as files are extracted.
     39 
     40 */
     41 package main
     42