Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
It would help to list build.command here so we can see what is being done. –  Sean Allred Jul 21 '13 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. –  Jack Aidley Jul 21 '13 at 17:44
add comment

1 Answer

up vote 1 down vote accepted

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.

share|improve this answer
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. –  Sean Allred Jul 21 '13 at 18:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.