Use of readlink in starting script

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Won't Fix
    • None
    • Component/s: None
    • None

      Hello, I modified the file "fisheyectl.sh" and I propose the following modifications, I think it is general and it should work for everybody else (although by a quick google lookup, it seems there would some issues on MAC OS/X...

      This script attempts to autodetect where the program is installed. I tried to use a two level symbolic links on this script (my setup):

      /misc/altgit/bin/fisheyectl.sh -> /misc/altgit/local/crucible/bin/fisheyectl.sh
      /misc/altgit/local/crucible -> /misc/altgit/local/fecru-2.10.0

      And because of these symbolic links the program stops with the following error:

      $ ./fisheyectl.sh
      Error: Could not find /misc/altgit/fisheyeboot.jar

      The autodetection mechanism does not seems to resolve even the first link level.

      As for the proposed modification, instead of (line 12-14, fisheyectl.sh) :

      FISHEYE_HOME=`dirname "$PRG"`/..

      1. make it fully qualified
        FISHEYE_HOME=`cd "$FISHEYE_HOME" && pwd`

      I propose :

      FISHEYE_HOME=`dirname $(readlink -e "$PRG")`/..

      I could patch the file each time, but it would be appreciated if it could come right of the box. Thanks!

              Assignee:
              Unassigned
              Reporter:
              Felipe Kraemer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: