3

I have a custom build script build.command that runs through the build steps necessary to convert my LaTex scripts into a .pdf (e.g. makeglossaries and so on). The script works fine. However when I try and get it to run in TexStudio it complains, saying: Error: Could not start the command: /Users/jackaidley/Documents/report/build.command "report". However, if I copy and paste from that to the Terminal and run the command then it works fine so I don't understand what the problem could be?

I have set it to run by modifying the pdfLaTex run command to ?a)build.command %.

This on Mac OS X 10.8.4 with TexStudio 2.4.

2
  • It would help to list build.command here so we can see what is being done. Commented Jul 21, 2013 at 17:30
  • It's not getting as far as running build.command so what's in it makes no difference, does it? Actually, though, that's given me an idea. Commented Jul 21, 2013 at 17:44

1 Answer 1

1

The reason it wasn't working was that the build.command file didn't contain the first line #!/bin/bash. I'm not sure why it would work from the command line but via TexStudio but there you go.

Thanks to Sean Allred's comment for giving me the inspiration to try this.

1
  • 3
    Note that if one were to say #!/bin/env python instead as the first line, you could write a python script to process (eg compile) your document. That first line is called a shebang, and it tells other programs what kind of script it is. If you're already running bash (via Terminal), then bash will just do what bash does. Commented Jul 21, 2013 at 18:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .