#!/bin/sh # # ========================================================================= # File: wget-sun-manuals # # Copyright (c) 2005 and onwards, Josh Glover # # LICENCE: # # This file is distributed under the terms of the BSD License (version # 2). See the COPYING file, which should have been distributed with this # file, for details. If you did not receive the COPYING file, see: # # http://www.jmglov.net/opensource/licenses/bsd.txt # # DESCRIPTION: # # Downloads Sun manuals. # # USAGE: # # wget-sun-manuals --help # # EXAMPLES: # # *** # # DEPENDENCIES: # # /bin/sh # wget # # MODIFICATIONS: # # Josh Glover (2005/04/01): Initial revision # ========================================================================= # Constants # ------------------------------------------------------------------------- # Constant: COLLECTION # # Default collection COLLECTION="" # Constant: HOST # # Hostname of Sun documentation server HOST="docs-pdf.sun.com" html="${HTML}" html_indent="${HTML_INDENT" html_indent_char="${HTML_INDENT_CHAR}" protocol="${PROTOCOL}" # Constant: PROTOCOL # # Default protocol to use PROTOCOL=http # Constant: SUN_DOCS_HOST # # Hostname of Sun documentation server SUN_DOCS_HOST=docs-pdf.sun.com # ------------------------------------------------------------------------- # Functions # ------------------------------------------------------------------------- # Function: usage() # # Displays a usage message. # # Parameters: # # errcode - if non-zero, the usage message will be printed to standard # error # # Returns: # # errcode usage() { # errcode defaults to 0 errcode=$1 if test -z "${errcode}"; then errcode=0; fi msg="Usage: $0"' {