import tempfile


def create_script(contents):
    """ Helper to create temporary file """
    f = tempfile.NamedTemporaryFile(delete=False, prefix='.sh')
    f.write(contents)
    f.close()
    return f.name