This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: mknetrel builds Guile #2: debug

Christopher Faylor <> writes:

>>   - add debugging feature: drop to shell upon failure
> I normally run mknetrel in the background.  In fact, I just added a
> couple of options to accommodate this.  They would conflict with this
> patch.


> If you want to add this functionality, introduce an option.  I don't
> want to have this as the default.

Sure, that's inconvenient.  I thought about adding it to -x, but you
may well want to have a detailed, noninteractive log, at times.  So,
I decided to add -X option for this.

Also, I made -h exit successfully, not to annoy you or anything, saw
you were messing with this too.  Hope you like the way I did it.  I
thought about adding a help () funtion, but decided that would be

What I really think we should also do, is to start the script with

    set -e

and let bash decide when something's wrong.  Then we can rid of stuff

    mkdir foo || exit 1

It is annoying that you'll have to add '|| true' clauses to some
checks that are allowed to fail, but in general, I feel that a bourn
script *should* start with set -e.  Any sane interpreter stops upon
error.  What do you think?


Btw: A very silly question, but I can't seem to get `cvs diff' to
     respect your (Cygwin's?) wishes of excluding the ChangeLog from
     the diff.  It doesn't grok -X,--exclude options, most annoying.
     How do you manage?

2002-07-09  Jan Nieuwenhuizen  <>

	* bin/mknetrel: Invoke atexit () before exiting.
	(atexit): New function.
	(drop): New funtion.
	(usage): Return (previously: exit unsuccessfully).
	(setup): Add -X option to make mknetrel drop to shell upon error.
	Exit successfully for -h, unsuccessfully upon usage error.
	(setup1): Exit unsuccessfully upon usage error.
	* .cvsignore: Add .bash_mknetrel.

Attachment: mknetrel.jcn2.debug.diff
Description: debug, 2nd try

Jan Nieuwenhuizen <> | GNU LilyPond - The music typesetter       |

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]