[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Packages removing alternatives on upgrade

Ivan Shmakov <oneingray@gmail.com> writes:

> 	?  How is the ‘if’ statement above different to, say:

> case "$1" in
>     (remove)
>         update-alternatives --remove <foo> <path-to-foo>
>         ;;
> esac

It's not; what it *is* different from is the more common case
construction, which instead looks like:

case "$1" in
        update-alternatives --remove <foo> <path-to-foo>
        echo "Unknown call $@" >&2
        exit 1

If the case doesn't have that default case, it doesn't have this problem,
but when you see the case statement, you usually see that form.

Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>

Reply to: