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

Re: Way to switch easily (Was: Re: Egcs, gcc, and Debian)



SirDibos <jwalther@citytel.net> writes:

[snip]

> Have a "switcher" to flip symlinks.  have gcc be a symlink to either egcc
> or gcc, all ov which stay in their own hierarchy.
> 
> For instance, maybe have egcc and gcc.orig in /usr/bin, and gcc be a
> symlink to one ov the two.  Its quick, dirty, but can anyone think of any
> reason atall why it wouldnt work?

You have to be root.

How about an environment variable?  Something like this in /usr/bin/cc:

#!/bin/sh
DEFAULTCC=/usr/bin/gcc
exec "${REALCC:-$DEFAULTCC}" "$@"

where DEFAULTCC can be modified according to which _should_ be the
default.

-- 
		Carey Evans  <*>  c.evans@clear.net.nz

   "On the telephone line I am anyone, I am anything I want to be."
                                       - Savage Garden, _Santa Monica_


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: