To avoid the overhead of starting the Bourne shell just to utilize IFS,
you can use a csh variable modifier to break the path up on each ':'
foreach dir ( "" ${GNUSTEP_TOOLS_PATHLIST:as~:~ ~} )
instead of
foreach dir ( `/bin/sh -c 'IFS=:; for i in
'"${GNUSTEP_TOOLS_PATHLIST}"'; do echo $i; done'` )
:a --> apply to all
:s~a~b~ --> substitute string b for string a
(Note that there is a space between the last two tildes, so this
substitutes a space for all colon delimiters in the variable value).
HTH
--Robert
On Mar 8, 2007, at 9:13 AM, Nicola Pero wrote:
Thanks ... clever. I fixed it on trunk. :-)
Thanks for your help
-----Original Message-----
From: Wolfgang Lux <[EMAIL PROTECTED]>
Sent: Sat, March 3, 2007 10:17 am
To: [EMAIL PROTECTED]
Cc: Discuss-gnustep <[email protected]>
Subject: Re: Customizable filesystem support for GNUstep
I wrote:
Nicola Pero wrote:
Anyway - let me know if it now works better! ;-)
It does. Thanks
I shall correct myself -- it almost works. GNUstep.csh doesn't
set up $path correctly. In particular, the various Tools
directories are not included in the path due to a quotation
error. The patch below fixes this.
Regards
Wolfgang
Index: GNUstep.csh.in
===================================================================
--- GNUstep.csh.in (Revision 24757)
+++ GNUstep.csh.in (Arbeitskopie)
@@ -197,7 +197,7 @@
end
set temp_path = ""
-foreach dir ( `/bin/sh -c 'IFS=:; for i in $
{GNUSTEP_TOOLS_PATHLIST}; do echo $i; done'` )
+foreach dir ( `/bin/sh -c 'IFS=:; for i in '"$
{GNUSTEP_TOOLS_PATHLIST}"'; do echo $i; done'` )
set temp_path="${temp_path}${dir}:"
if ( "${GNUSTEP_IS_FLATTENED}" == "no" ) then
set temp_path="${temp_path}${dir}/${GNUSTEP_HOST_CPU}/$
{GNUSTEP_HOST_OS}/${LIBRARY_COMBO}:"
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep