Skip to content

Commit

Permalink
Merge pull request #505 from rkopicki/main
Browse files Browse the repository at this point in the history
Enable use of a symlink to bin/docbook (.py)
  • Loading branch information
ndw authored Sep 21, 2024
2 parents a4fea04 + 053c89b commit b377c8c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/bin/docbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

class JavaClassRunnerException(Exception):
"""Subclass of Exception for errors raised by the runner."""
pass


class JavaClassRunner:
Expand Down Expand Up @@ -64,10 +65,12 @@ def __init__(self, args):
self._cp = {}
self._seen = {}

# This script assumes it's in /path/to/somewhere/docbook/bin/python
# This script assumes it's in /path/to/somewhere/docbook/bin
# where "docbook" is the root of the distribution. If you move
# this script into /usr/local/bin or something, it won't work.
self.root = os.path.abspath(__file__)
# Instead, create a symbolic link with:
# ln -s /path/to/somewhere/docbook/bin/docbook /usr/local/bin/docbook
self.root = os.path.realpath(__file__)
self.root = self.root[0:self.root.rfind(os.sep)] # strip /docbook
self.root = self.root[0:self.root.rfind(os.sep)] # strip /bin

Expand Down

0 comments on commit b377c8c

Please sign in to comment.