Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: new and updated completions



Borsenkow Andrej <Andrej.Borsenkow@xxxxxxxxxxxxxx> writes:

> Chmouel Boudjnah wrote:
> 
> > Oliver Kiddle <opk@xxxxxxxxxxxxx> writes:
> >
> >>anyone can think of a good way to detect RedHat/Mandrake, please let me
> >>
> > /etc/{mandrake,redhat}-release
> >
> 
> Meaning

yep better to do a :

if [[ -e /etc/mandrake-release ]]; then
    we are on Mandrake
elif [[ -e /etc/redhat-release ]]; then
     we are on RedHat
fi

mandrake one before redhat.

> if [[ -e /etc/mandrake-release ]]; then
>    we are on Mandrake
> else ...
> 
> {pts/1}% ll /etc/*-release
> -rw-r--r--    1 root     root           45 ??? 19 22:30
> /etc/mandrake-release
> lrwxrwxrwx    1 root     root           16 ??? 23 00:32
> /etc/redhat-release -> mandrake-release



Messages sorted by: Reverse Date, Date, Thread, Author