sourceforge > jabs
JABS
 

Shell Script

Shell Script

Use the Shell Script task to define and execute a set of system commands.

Shell Script

FieldRequiredPropertyDescription
NameYesThe name of the task
DirectoryNoThe working directory to run the command from. The default value is ${project.path}
ShellYesThe location of the shell to execute this script. On Unix, this will typically be /bin/sh
ScriptYesEnter the commands for the script. When the task is executed, this will be written as tmp file and executed using the shell defined in the Shell field
EnabledYesEnable/Disable the task
On ErrorYesWhat to do if an error is detected

The shell task is an extension of the Exec task that includes the ability to write the script to execute. The shell to use needs to be specified. The following table contains examples that have been tested.

OSShellComments
Unix/bin/shThis is pretty common for most all Unix variants.
Windowscmd /C callOn windows, the temp file will have the .bat extension added to it.
Cygwinc:/cygwin/bin/bash
Antant -fYes, you can even paste a simple ant build file if so desired. On windows, use ant.bat. In fact, most script interpreters that take script files as a parameter will work this way.