Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

resolves #29 allow relative docbook xsl dir #30

Merged
merged 2 commits into from Sep 27, 2014

Conversation

DavidGamba
Copy link

No description provided.

@mojavelinux
Copy link
Member

This is a nice enhancement. However, readlink -f isn't available on all systems (in particular, it isn't available on some OSX systems). We should fallback to greadlink on those systems, and if all else fails, just take the directory as specified. Something like:

DOCBOOK_XSL_ABS_DIR=`readlink -f "$DOCBOOK_XSL_DIR" 2>/dev/null`
if [ $? -ne 0 ]; then
  DOCBOOK_XSL_ABS_DIR=`greadlink -f "$DOCBOOK_XSL_DIR" 2>/dev/null`
  if [ $? -ne 0 ]; then
    DOCBOOK_XSL_ABS_DIR="$DOCBOOK_XSL_DIR"
  fi
fi

wdyt?

@mojavelinux
Copy link
Member

Of course, we could get even fancier and create a function to resolve the relative path in a portable way...but I'm fine with hacking our way through it :)

@DavidGamba
Copy link
Author

I do remember having to write my own version of readlink for HP-UX one
time. I didn't know OSX doesn't have it either.

The solution looks good to me. I am glad you have a wider picture :-) I
think that hack is very portable ;-)

--David

On Thu, Sep 11, 2014 at 12:44 AM, Dan Allen notifications@github.com
wrote:

Of course, we could get even fancier and create a function to resolve the
relative path in a portable way...but I'm fine with hacking our way through
it :)


Reply to this email directly or view it on GitHub
#30 (comment)
.

@mojavelinux
Copy link
Member

Would you be able to update the PR?

@DavidGamba
Copy link
Author

Sure. I'll do that on Monday.

@mojavelinux
Copy link
Member

Super!

@DavidGamba
Copy link
Author

Here it is, sorry for the delay, I have been super busy at work. Please test it on OSX as I don't have have any macs around.

@mojavelinux
Copy link
Member

Thanks David!

mojavelinux added a commit that referenced this pull request Sep 27, 2014
resolves #29 allow relative docbook xsl dir
@mojavelinux mojavelinux merged commit e1f7341 into asciidoctor:master Sep 27, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants