Skip to content

Instantly share code, notes, and snippets.

@apfohl
Created October 17, 2013 17:55
Show Gist options
  • Select an option

  • Save apfohl/7029347 to your computer and use it in GitHub Desktop.

Select an option

Save apfohl/7029347 to your computer and use it in GitHub Desktop.
This patch fixes the makeindex path problem with Rubber.
diff --git a/src/latex_modules/index.py b/src/latex_modules/index.py
index eb59023..a682788 100644
--- a/src/latex_modules/index.py
+++ b/src/latex_modules/index.py
@@ -38,7 +38,7 @@ this argument, they apply to all indices declared at the point where they
occur.
"""
-import os, os.path, re
+import os, os.path, re, string
from rubber import _, msg
from rubber.util import *
@@ -109,11 +109,11 @@ class Index:
msg.progress(_("processing index %s") % msg.simplify(self.source))
if self.tool == "makeindex":
- cmd = ["makeindex", "-q", "-o", self.target] + self.opts
- cmd.extend(["-t", self.transcript])
+ cmd = ["makeindex", "-q", "-o", string.split(self.target, '/')[-1]] + self.opts
+ cmd.extend(["-t", string.split(self.transcript, '/')[-1]])
if self.style:
- cmd.extend(["-s", self.style])
- cmd.append(self.source)
+ cmd.extend(["-s", string.split(self.style, '/')[-1]])
+ cmd.append(string.split(self.source, '/')[-1])
path_var = "INDEXSTYLE"
elif self.tool == "xindy":
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment