cylc/cylc — pull request #470 by trwhitcomb (2013-05-15 17:59:27+00:00)
Title: Correct cylc jobfile Korn shell function definition syntax.

The documentation notes that the shell command in the job submission
configuration section (i.e. the shell used to interpret the job script
submitted by cylc) allows for either Bourne shell (e.g. /bin/bash)
or a Korn shell (/bin/ksh) since they use similar styles for defining
environment variables. However, switching this to use the Korn shell
results in a syntax error. The HANDLE_TRAP function written into
the cylc script uses Bourne shell syntax with a '()' following the
function name, which gives an error when parsed by the Korn shell.

This change modifies the function written out to the job file to use
the appropriate (Bourne/Korn) syntax depending on the shell specified
in the suite configuration file.