Changeset 14487 for trunk/base


Ignore:
Timestamp:
Oct 8, 2005, 10:24:14 PM (15 years ago)
Author:
jberry
Message:

Move verbose part of usage to help, add references to man pages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port/port.tcl

    r14424 r14487  
    33exec @TCLSH@ "$0" "$@"
    44# port.tcl
    5 # $Id: port.tcl,v 1.112 2005/10/04 22:54:09 jberry Exp $
     5# $Id: port.tcl,v 1.113 2005/10/08 22:24:14 jberry Exp $
    66#
    77# Copyright (c) 2004 Robert Shaw <rshaw@opendarwin.org>
     
    131131proc print_usage args {
    132132        global argv0
     133        set cmd [file tail $argv0]
    133134        set usage { [-vdqfonasbckt] [-D portdir] [-u porturl] action [actionflags]
    134         [[portname|pseudo-portname|port-url] [version] [+-variant]... [option=value]...]...
     135[[portname|pseudo-portname|port-url] [version] [+-variant]... [option=value]...]...
     136}
     137               
     138        puts "Usage: $cmd $usage"
     139        puts "\"$cmd help\" or \"man 1 port\" for more information."
     140}
     141
     142
     143proc print_help args {
     144        global argv0
     145       
     146        set help { [-vdqfonasbckt] [-D portdir] [-u porturl] action [actionflags]
     147[[portname|pseudo-portname|port-url] [version] [+-variant]... [option=value]...]...
    135148       
    136149Valid actions are:
     
    162175        using expressions consisting of and, or, not, !, (, and ).
    163176       
    164         }
    165        
    166         puts "Usage: [file tail $argv0]$usage"
    167 }
     177For more information:
     178        See man pages: port(1), ports.conf(5), portfile(7), portgroup(7),
     179        porthier(7), portstyle(7).
     180       
     181        }
     182       
     183        puts "[file tail $argv0]$help"
     184}
     185
     186
    168187
    169188# Produce error message and exit
     
    11341153
    11351154        help {
    1136                 print_usage
     1155                print_help
    11371156        }
    11381157
     
    17301749                                fatal_softcontinue "Unable to execute port: $result"
    17311750                        }
    1732                
     1751
    17331752                        dportclose $workername
    17341753                       
Note: See TracChangeset for help on using the changeset viewer.