In relation to the comments I want to show how a shell script can be insert in Kile:
For the explanation we take a simple shell script
#!/bin/bash
pdflatex $@
In our example we call it shellexample. Now the shell script must be executable with chmod:
chmod a+x shellexample
To use the shell script we must copy the script to /usr/local/bin
sudo cp shellexample /usr/local/bin
Now we can run our script from every point.
Now we start Kile. In the toolbar we go to Setting -> Configure Kile. In the new window we choose in the left sidebar under Tools -> Build.
Now we can add a new tool. We push the button New... and follow the coming introduction:
- Toolname (in our example:
shellscriptinkile)
- Class (in our case we need no class)
The new tool is finished. In the selected tool we add the name of our shell script in the command field : shellexample. Now we can close the Window because Kile now know our script.
At this point Kile has no shortcut for our script. To define a shortcut:
- go to: Settings -> Configure Shortcuts
- In the new open window we search in the Search-field our defined toolname:
shellscriptinkile
- set the shortcut :D
To get some inspiration how to define a new tool you can look at the tools pdflatex, makeindex and so on.