Arc Forumnew | comments | leaders | submitlogin
anarki arc.sh on Mac OS X Tiger
1 point by jimm 6032 days ago | 3 comments
The latest version of anarki's arc.sh does not run on Mac OS X Tiger. The problem is with its version of bash, which does not like the line

  arc_dir=$(dirname $(readlink --canonicalize "$0"))
The readlink command does not take "--canonicalize" as an argument. Here is my proposed solution.

  if [ `uname` = 'Darwin' ] ; then
      arc_dir=$(dirname "$0")
  else
      arc_dir=$(dirname $(readlink --canonicalize "$0"))
  fi
Note that it gets rid of the readlink entirely. That's because Tiger's version of readlink prints nothing unless its argument is a link.

Comments?



1 point by jimm 6031 days ago | link

I've committed an improved version of this change that uses Mac OS X's version of readlink.

-----

1 point by jimm 6032 days ago | link

A follow-up question: is anybody using Leopard having the same problem with arc.sh?

-----

1 point by jmatt 6024 days ago | link

Yes.

I changed a lot of my arc.sh months ago and didn't want to commit it to Anarki.Since Anarki initially had a lot of linux users and it would have misbehaved linux.

Thanks for commiting the improvements!

-----