How to dump a folder into a specific path

I have a folder x that I want to be put in my snap at a path that I can access.

Afaict the dump plugin puts everything into the root of the snap, which I don’t know how to access (I also don’t know if it would be a good idea to put it there); except the files marked with organize, but I want to specify the position of an entire folder, not a single file.

What do I do?

Hi @nerevarine .

You can do something like this (in your .yaml file) :

parts:
  foo:
    plugin: dump
    # ...
    override-build: |
      snapcraftctl build
      
       # If the `target` folder does not exist, you must create it (e.g `mkdir -p $SNAPCRAFT_PART_INSTALL/hello`)
       mv $SNAPCRAFT_PART_INSTALL/<the-x-folder>  <target-folder>

Here a link for more information about overriding