Is there a way to expose a directory, containing static libraries files or document other than specifying every one if the files? Example, for a software repo that has this structure:
program +---- myProgram # expose as /usr/bin/myProgram using snapcraft command | +---- vendors/ # expose as /libs/myProgramLib for its descendants +---- companyA | +---- data.txt +---- companyB # automatically exposed as /libs/myProgramLib/companyB | +---- data.txt # exposed as /libs/myProgramLib/companyB/data +---- companyC +---- data.txt
I’m aware one way is to “tar” the
vendors folder and have a single command to “untar” it to the
/libs/myProgramLib, however, I have a feeling that this is a hackish way of doing things. Those files are static non-executable files mainly for read.
The reason for exposing a single folder is mainly to isolate each companies from mangling with the
snapcraft.yaml each time anyone of them adds a data file, which has the tendency to disrupt the build process.
Snapcraft doesn’t allow exposing a folder as a command. It will return the following error in particular:
... IsADirectoryError: [Errno 21] Is a directory: '[targeted_command]'