bugLiberty Eiffel - Bugs: bug #43896, install.sh does not run on MacOS...

 
 

bug #43896: install.sh does not run on MacOS X(maybe on BSD variants)(because of readlink)

Submitted by:  KOIZUMI Satoru <koizumistr>
Submitted on:  Sat 27 Dec 2014 07:33:46 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: Cyril Adrian <cadrian>Open/Closed: Closed
Release: NoneFixed Release: bell
Planned Release: bell

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 15 Jan 2015 01:16:56 PM UTC, comment #2:

Fixed by 13da427f69fff182fac5f61a55c3fb8481073236

Cyril Adrian <cadrian>
Project AdministratorIn charge of this item.
Thu 15 Jan 2015 12:32:07 PM UTC, comment #1:

Hi,

Thanks for your work.

I think your solution is not generic enough. For instance, it does not work if the directory containing the script is a symlink (and not the script itself). There are too many ways readlink returns nothing and exits with non-zero

I will try to come up with a more generic solution.

Best regards,

Cyril

Cyril Adrian <cadrian>
Project AdministratorIn charge of this item.
Sat 27 Dec 2014 07:33:46 AM UTC, original submission:

readlink of BSD variants does not accept -f option.
So '$(readlink -f $0)' returns nothing, and then 'cd $(dirname $(readlink -f $0))' means 'cd (~)'(cd into home dir).

install.sh on MacOS X has more problems, but it might be useful for other BSD variants to solve the readlink problem. So I attach a patch. I consulted http://mywiki.wooledge.org/BashFAQ/028 for this solution.

KOIZUMI Satoru <koizumistr>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #32719:  install.sh.diff added by koizumistr (445B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by koizumistr (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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 15 Jan 2015 01:16:56 PM UTCcadrianStatusIn Progress=>Fixed
      Assigned toNone=>cadrian
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>bell
    Thu 15 Jan 2015 12:15:42 PM UTCcadrianStatusNone=>In Progress
      Planned ReleaseNone=>bell
    Sat 27 Dec 2014 07:33:46 AM UTCkoizumistrAttached File-=>Added install.sh.diff, #32719

    Back to the top


    Powered by Savane 3.1-cleanup1