[24237] 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 (Benjamin Kaduk)
Mon Jun 8 03:29:54 2009

Date: Mon, 8 Jun 2009 03:29:44 -0400 (EDT)
From: Benjamin Kaduk <kaduk@MIT.EDU>
To: Geoffrey Thomas <geofft@MIT.EDU>
cc: source-commits@MIT.EDU
In-Reply-To: <200906072208.n57M8toQ019326@drugstore.mit.edu>
Message-ID: <alpine.GSO.1.10.0906080327520.17043@multics.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

On Sun, 7 Jun 2009, Geoffrey Thomas wrote:

> Author: geofft
> Date: 2009-06-07 18:08:54 -0400 (Sun, 07 Jun 2009)
> New Revision: 23837
>
> Modified:
>   trunk/debathena/scripts/damove
> Log:
> Make it impossible to make the mistake I just made.
>
> (Well, you can still do so, but you'll be told that you're making a
> mistake.)
>
>
>
> Modified: trunk/debathena/scripts/damove
> ===================================================================
> --- trunk/debathena/scripts/damove	2009-06-04 00:17:54 UTC (rev 23836)
> +++ trunk/debathena/scripts/damove	2009-06-07 22:08:54 UTC (rev 23837)
> @@ -11,12 +11,29 @@
> : ${DEBATHENA_APT=/mit/debathena/apt}
> . $(dirname "$0")/debian-versions.sh
>
> -if [ "$#" -lt 3 ]; then
> -    echo "Usage: damove NEW_SUFFIX OLD_SUFFIX PACKAGE" >&2
> +if [ "$#" -ne 3 ]; then
> +    echo "Usage: damove NEW_SUFFIX OLD_SUFFIX SOURCE_PACKAGE" >&2
>     exit 1
> fi
>
> +case "${1}/${2}" in
> +  /-proposed) ;;
> +  /-development) ;;
> +  -proposed/-development) ;;
> +  *)
> +    echo "WAIT. You are about to move $3"
> +    echo "  FROM debathena$2 TO debathena$1,"
> +    echo -n "which is probably backwards. Is that a good idea [yes/N]? "
> +    read yn
> +    if [ "$yn" != "yes" ]; then
> +      echo "that's what I thought. Exiting."
> +      return 1
> +    fi ;;
> +esac


Um, I am confused.  If I reply "yes" to the question "Is that a good 
idea?", then the script dies.  Shouldn't it be the other way around?
It may be better to change the text to "enter $foo to continue"
or "Do you want to continue?" or something like that.

--kaduk

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