Shell script launcher fails if symlinked

Description

Unzipping the Linux distribution offered on the website works well so long as the shell script is always called from within the PCGen directory itself.

It fails, however, if one does the following (or similar):

This is because the final line of the script reads:

I've made it work through a symlink by placing the following line directly before it:

Which, should the script be called from anywhere, will change into the directory where the script actually lives.

This is more standard behavior for GNU/Linux programs, but if You are targeting Unix as well You may not wish to rely on GNU coreutils like I have in the solution... But I think some kind of change would be good and fairly trivial to implement.

Environment

Slackware Linux 14.2 using the zipfile distribution.

Activity

Show:
Tom Parker
February 14, 2018, 5:10 AM

PR#3672

Fixed

Assignee

Tom Parker

Reporter

Christopher Rodriguez

Labels

None

Theme

None

Epic/Theme

None

Pending User Input

No

Time tracking

0m

Time remaining

10m

Components

Fix versions

Affects versions

Priority

Minor
Configure