code: def build_job_scripts(root_dir, jobs):
      
      # Loop over the job list, creating each job script in turn, and then adding
      # scriptPath to the Job object
      for job in jobs:
          scriptpath = os.path.join(root_dir, "jobs", job.name)
          with open(scriptpath, "w") as scriptfile:
              scriptfile.write("#!/bin/sh\n#$ -S /bin/bash\n%s\n" % job.script)
          job.scriptpath = scriptpath
docs: Constructs the script for each passed Job in the jobs iterable
  
      - root_dir      Path to output directory