shell.executable("bash")

rule all:
    input: "delete_all_output", "delete_temp_output"
    output: touch("all_ok")

rule delete_all_output:
    output: touch("delete_all_output")
    shell:
        """
        echo $PATH
        ls
        python -m snakemake --cores 1 -s Snakefile_inner all && \
        rm nothere && \
        python -m snakemake --cores 1 -s Snakefile_inner --delete-all-output all && \
        test -f infile && test ! -f intermediate && test ! -f some_dir/final && \
        test ! -d empty_dir && test ! -L dangling && test ! -d full_dir
        """

rule delete_temp_output:
    output: touch("delete_temp_output")
    shell:
        """
        python -m snakemake --cores 1 -s Snakefile_inner --notemp temp && \
        python -m snakemake --cores 1 -s Snakefile_inner --delete-temp-output temp && \
        test -f infile && test ! -f temp_intermediate && \
        test ! -d temp_empty_dir && test ! -d temp_full_dir && test -f temp_keep
        """
