bugGNUstep - Bugs: bug #23618, gnustep-config tool broken on...

Group
 
 

bug #23618: gnustep-config tool broken on solaris

Submitter:  Richard Frith-Macdonald <CaS>
Submitted:  Tue 17 Jun 2008 01:32:02 PM UTC
   
 
Category:  Makefiles Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 17 Jun 2008 06:24:49 PM UTC, comment #3: 

Thanks for the help.
I used
gs_variable_value=`eval echo '$'"$gs_variable_name"`
which seems to work and is clear/simple to me.

I have committed the fix to svn trunk

Richard Frith-Macdonald <CaS>
Group Member
Tue 17 Jun 2008 05:20:51 PM UTC, comment #2: 

The POSIX shell on Solaris is /usr/xpg4/bin/sh, and will have behavior much more similar to bash that the default sh. 

That said, I have scripts that need to run in /bin/sh, /bin/ksh, or bash on several different platforms and find the following idiom works on all of them:

gs_variable_value=`eval echo "$\`echo $gs_variable_name\`"`

Robert J. Slover <rslover>
Tue 17 Jun 2008 02:45:07 PM UTC, comment #1: 

From my light testing, both
  gs_variable_value=`eval echo '$'"$gs_variable_name"`
and
  gs_variable_value=`eval echo "$""$gs_variable_name"`
seem to work in bash and dash.  Can you check if they work in Solaris?

The first option is probably the better of the two, IMHO, if they both work.

Hubert Chathi <uhoreg>
Tue 17 Jun 2008 01:32:02 PM UTC, original submission:  

The gnustep-config script has a line near the end which uses 'eval' to assign a value to gs_variable_value.

Using the default shell (/bin/sh) on Solaris-10, the shell barfs on this line ... it seems that different shells do things different ways, and the script is expecting bash behavior from /bin.sh

gs_variable_value=`eval echo $"$gs_variable_name"`

seems to work with the solaris shell, but not with bash



Richard Frith-Macdonald <CaS>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rslover (Posted a comment)
  • -email is unavailable- added by uhoreg (Posted a comment)
  • -email is unavailable- added by CaS (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-06-17 CaS Open/ClosedOpen Closed
    2008-06-17 CaS StatusNone Fixed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code