[24239] in Source-Commits

home help back first fref pref prev next nref lref last post

Re: /svn/athena r23837 - trunk/debathena/scripts

daemon@ATHENA.MIT.EDU (Geoffrey Thomas)
Mon Jun 8 13:12:31 2009

Date: Mon, 8 Jun 2009 13:12:20 -0400 (EDT)
From: Geoffrey Thomas <geofft@MIT.EDU>
To: Greg Hudson <ghudson@mit.edu>
cc: Benjamin Kaduk <kaduk@mit.edu>, source-commits@mit.edu
In-Reply-To: <1244451798.20017.46.camel@ray>
Message-ID: <alpine.DEB.2.00.0906081310300.4151@corndog.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII

On Mon, 8 Jun 2009, Greg Hudson wrote:

> On Mon, 2009-06-08 at 03:29 -0400, Benjamin Kaduk wrote:
>>> +    if [ "$yn" != "yes" ]; then
>
>> Um, I am confused.  If I reply "yes" to the question "Is that a good
>> idea?", then the script dies.
>
> I think you misread the sense of the test.

yup.

> However, I think the question may be using confusing syntax:
>
>> +    echo -n "which is probably backwards. Is that a good idea [yes/N]? "
>
> Often, brackets used like that indicate a default, but here they are
> used to list the possible options.

It's like [y/N], except you have to spell out the word "yes". If you type 
"yes", the script will continue. If you type anything else, including "n" 
or nothing, then it will die.

I did test this a few times (on my laptop that doesn't have reprepro 
installed), so it does work correctly.

-- 
Geoffrey Thomas
geofft@mit.edu

home help back first fref pref prev next nref lref last post