Skip to content

remove directory entries before directories #112

@sertonix

Description

@sertonix

When using samu -t clean samu might try to remove directories before removing their contents. It would be nice if samu would try to remove directory entries first before trying to remove a directory.

rule mkdir
  command = mkdir -p $out $out/baz

build foo | foo/baz: mkdir
$ samu
[1/1] mkdir -p foo foo/baz
$ samu -t clean
samu: remove foo: Directory not empty
remove foo/baz

When dyndep support (#48) will be added this is also required to clean up an extracted tar file with nested directories since it is not possible to create new targets in dyndeps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions