def single_run(**kwargs):
    """Generates the necessary shell-fu for a single benchmark invocation.

    """
    template = """
    printf "\\033[2K\\r"
    printf "[{idx}/{total}] {vm.name}: {bench.name}"
    printf "<?\\n" > {include}
    printf "include 'util.php';\\n" >> {include}
    printf "include '{bench.path}';\\n" >> {include}
    printf "QueueRuns({extra_iters}, \\${bench.name});\\n" >> {include}
    {setenv}
    {wrapper} --compile --build-root={vm.path} {perf} -- {harness} > {tmp}
    {unsetenv}
    cat {tmp} | tail -n +{lines_to_chop} >> {runlog}
    """
    lines = template.format(**kwargs).split('\n')[1:-1]
    return [s.strip() for s in lines]