[patch] cygport-0.2.7 custom commands

Charles Wilson cygwin@cwilson.fastmail.fm
Sat Jan 6 04:51:00 GMT 2007

Implements an extensible method of calling custom cygport functions from 
the cygport command line, in addition to the existing prep, install, 
check, pkg ones (etc).  This is a forward port of the original patch, 
posted on 2006-12-9 here:

It works this way:
    cygport cvs-1.11.22-1 custom0-cvs_check_local_known_fail
will invoke cvs_check_local_known_fail() with no additional arguments.

    cygport cvs-1.11.22-1 custom3-cvs_do_one_test rcslib remote fail
will invoke cvs_do_one_test() with $1=rcslib $2=remote $3=fail.

Note that the number following 'custom' indicates how many arguments to 
consume and forward to the target command.  Variants from 0 to 9 are 

The custom-command framework will ONLY invoke shell functions; it can't 
be used to run arbitrary commands (although, you could simply edit the 
.cygport file to define a shell function which then runs those arbitrary 

The subcommand 'custom-show' will list all shell functions defined 
within the cygport runtime envionment, including those defined in the 
cygport file.
    cygport cvs-1.11.22-1 custom-show

As you can tell from my examples, I needed this functionality to deal 
with cvs's totally braindead testsuite "system".  (During development, 
that is.  Normal cygport usage for running the cvs testsuite would be 
'cygport cvs-1.11.22-1 check' as usual).

You can test the custom-command functionality (using any old cygport 
file) by doing:
    cygport some-cygport-file custom0-dummy
    cygport some-cygport-file custom1-dummy a
    cygport some-cygport-file custom2-dummy a b
etc -- or even
    cygport some-cygport-file \
        prep \
        custom2-dummy a b \
        compile \
        custom1-dummy c \
        install \
        custom4-dummy d e f g \

2007-01-05  Charles Wilson  <...>

	* bin/cygport.in (custom_dummy_core): new function, used to test
	custom-command framework
	(custom_dummy): ditto
	(main): add implentation for custom-show) and customN-*)

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygport-custom-cmds.patch
URL: <http://cygwin.com/pipermail/cygwin/attachments/20070106/dff98d03/attachment.ksh>
-------------- next part --------------
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

More information about the Cygwin mailing list