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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #23618: gnustep-config tool broken on solaris

Submitted by:  Richard Frith-Macdonald <CaS>
Submitted on:  Tue 17 Jun 2008 01:32:02 PM UTC  
 
Category: MakefilesSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

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>
Project 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>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 17 Jun 2008 06:24:49 PM UTCCaSOpen/ClosedOpen=>Closed
    Tue 17 Jun 2008 06:24:48 PM UTCCaSStatusNone=>Fixed

    Back to the top


    Powered by Savane 3.1-cleanup1