(* Create a temporary file containing the shell script fragment. *)
let script = dir // "script" in
let chan = open_out script in
+ fprintf chan "set -e\n"; (* So that jobs exit on error. *)
output_string chan job.job_script.sh_script;
close_out chan;
chmod script 0o700;