Changeset 14585 for trunk/base


Ignore:
Timestamp:
Oct 12, 2005, 10:35:01 PM (19 years ago)
Author:
jberry
Message:

Conspire to give the user version information if they ask for "--version"
(which is an extremely common idiom). We can't just give them the information,
since dportinit hasn't been called at the point where we process arguments,
but default "action" to "version" for this case (assuming they won't also
have asked for an action), and emit a warning message for good measure.

File:
1 edited

Legend:

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

    r14584 r14585  
    33exec @TCLSH@ "$0" "$@"
    44# port.tcl
    5 # $Id: port.tcl,v 1.131 2005/10/12 22:21:20 jberry Exp $
     5# $Id: port.tcl,v 1.132 2005/10/12 22:35:01 jberry Exp $
    66#
    77# Copyright (c) 2004 Robert Shaw <rshaw@opendarwin.org>
     
    10731073                break
    10741074        } elseif {[string index $arg 1] == "-"} {
    1075                 # Process long args -- we don't support any for now
    1076                 print_usage; exit 1
     1075                # Process long arguments
     1076                switch -- $arg {
     1077                        --version       { puts {(please use "version" to get version information)}; set action "version" }
     1078                        default         { print_usage; exit 1 }
     1079                }
    10771080        } else {
    10781081                # Process short arg(s)
Note: See TracChangeset for help on using the changeset viewer.