diff options
author | jlam <jlam@pkgsrc.org> | 2006-01-19 17:22:26 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2006-01-19 17:22:26 +0000 |
commit | 0533f0f79e87632428fcaa5a96e5fbfb119b79c9 (patch) | |
tree | 3a8a9afceddc22279899f9fbf87af4006121240a /mk/plist/doc-compress | |
parent | 536698c7d7f472cc2f44e4d761d6f135ea8cf4b5 (diff) | |
download | pkgsrc-0533f0f79e87632428fcaa5a96e5fbfb119b79c9.tar.gz |
Add a catman page to the script comments to clarify how this script
should be used. Also, do a minor reordering of lines so that the logic
is more clear.
Diffstat (limited to 'mk/plist/doc-compress')
-rwxr-xr-x | mk/plist/doc-compress | 46 |
1 files changed, 41 insertions, 5 deletions
diff --git a/mk/plist/doc-compress b/mk/plist/doc-compress index 680a94a8016..545659a032c 100755 --- a/mk/plist/doc-compress +++ b/mk/plist/doc-compress @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: doc-compress,v 1.2 2006/01/13 20:03:26 jlam Exp $ +# $NetBSD: doc-compress,v 1.3 2006/01/19 17:22:26 jlam Exp $ # # This script is derived from software contributed to The NetBSD Foundation # by Alistair Crooks. @@ -10,6 +10,40 @@ # compressed or uncompressed targets. # +###################################################################### +# +# NAME +# doc-compress -- handle compression of PLIST entries +# +# SYNOPSIS +# doc-compress [-v] [-z] prefix +# +# DESCRIPTION +# doc-compress handles compression of files passed in via standard +# input. The file paths must be relative to the specified prefix. +# doc-compress handles symlinks to compressed files intelligently by +# symlinking to the compressed target if compression is desired, and +# similarly for decompression. +# +# OPTIONS +# The following command line arguments are supported. +# +# -v Output the action taken for each file (compressing, +# decompressing, or symlinking) to standard output. +# +# -z Compress the files. By default, the files are decompressed. +# +# ENVIRONMENT +# MANZ This variable controls the default action taken. If "yes", +# then this is equivalent to specifying the "-z" option. +# +# PKG_VERBOSE +# This controls the default verbosity of the output. If +# non-empty, then this is equivalent to specifying the "-v" +# option. +# +###################################################################### + : ${ECHO=echo} : ${EXPR=expr} : ${GZIP_CMD=gzip} @@ -25,15 +59,17 @@ usage() { ${ECHO} 1>&2 "usage: $self [-v] [-z] prefix" } +compress=no +verbose=no +prefix=/nonexistent + case "$MANZ" in [yY][eE][sS]) compress=yes ;; -*) compress=no ;; esac case "$PKG_VERBOSE" in -"") verbose=no ;; -*) verbose=yes ;; +"") ;; +*) verbose=yes ;; esac -prefix=/nonexistent # Process optional arguments while ${TEST} $# -gt 0; do |