[Pkg-zsh-devel] Bug#707760: zsh: Alternatives broken for long time during upgrade from zsh4 to zsh5

Frank Terbeck ft at bewatermyfriend.org
Thu Oct 9 22:19:17 UTC 2014


Axel Beckert wrote:
> Sven Joachim wrote:
[...]
>> How about adding a symlink /bin/zsh4 -> zsh5 in the zsh package?  Not
>> extremely pretty, but it should work.
>
> What about putting a shell script at /bin/zsh4 which more or less
> looks this?
>
>   #!/bin/sh
>   
>   echo "$0 is deprecated, please switch to /bin/zsh or /usr/bin/zsh" 1>&2
>   exec /bin/zsh5 "$@"

I think this is the way to go. Maybe even like this:

#!/bin/zsh -f

if [[ -o interactive ]]; then
    echo "$0 is deprecated, please switch to /bin/zsh or /usr/bin/zsh" 1>&2
    echo "Use: chsh -s /bin/zsh" 1>&2
    echo "This command ($0) will disappear eventually!" 1>&2
fi
exec /bin/zsh "$@"

> Or maybe even
>
>   #!/bin/sh
>   set -e
>   
>   echo "$0 is deprecated, please switch to /bin/zsh or /usr/bin/zsh" 1>&2
>   /bin/zsh5 "$@"
>   exit 1

Too intrusive, IMHO.


Regards, Frank



More information about the Pkg-zsh-devel mailing list