pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/plist Add a catman page to the script comments to c...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/052e42f1b3f7
branches:  trunk
changeset: 506588:052e42f1b3f7
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Thu Jan 19 17:22:26 2006 +0000

description:
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:

 mk/plist/doc-compress |  46 +++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 41 insertions(+), 5 deletions(-)

diffs (74 lines):

diff -r e8c9d9832b1f -r 052e42f1b3f7 mk/plist/doc-compress
--- a/mk/plist/doc-compress     Thu Jan 19 16:24:51 2006 +0000
+++ b/mk/plist/doc-compress     Thu Jan 19 17:22:26 2006 +0000
@@ -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 @@
        ${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



Home | Main Index | Thread Index | Old Index