- To: Pete Ryland <pdr@xxxxxx>
- Subject: Re: [chat] portable scripting
- From: Andre Pang <ozone@xxxxxxxxxxxxxxxx>
- Date: Tue Jan 28 03:06:02 2003
- Cc: chat slug <slug-chat@xxxxxxxxxxx>
On Monday, January 27, 2003, at 07:29 PM, Pete Ryland wrote:
On Mon, Jan 27, 2003 at 09:32:10PM +1100, Ken Foskey wrote:
I want to write a portable script that must pass environment variables
to a configure script. If I use #!/bin/sh will "export
CC=/path/to/CC"
always work? This does not work with tcsh and there is a slight
possibility that this is the only shell installed and symlinked to sh.
configure scripts can be passed CC via the command line:
./configure CC=/path/to/cc
The portable way to do it is:
CC=/path/to/cc
export CC
bash's "export CC=..." is just shorthand for "CC=...; export CC".
--
# <ozone@xxxxxxxxxxxxxxxx> : trust.in.love.to.save