-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add glob support #95
Comments
Hmm, it's not that simple. Just allowing shell expansion will change the behavior of |
We can simply workaround that: if (stat(pattern) == 0) {
// file exists, process it as is
} else {
glob_t gl;
glob(pattern, GLOB_BRACE | GLOB_TILDE, NULL, &gl);
// process as array of files, if any
} |
What might make more sense is a layering system sort of like how dtb includes work. That way you can have a base config with overlay configs with board specific changes. |
|
Unfortunately that not trivial to do in a reliable reproducible fashion. First we would need to copy everything because most tools take one directory tree as input. And plain C is not a very good language to do this. With vfat this is all rather simple. There are no permissions or ownership. Other filesystems are a lot more complex. |
To be honest... Is C even good language for genimage? We end up calling lot of external tools (eg. mkfs) for performance critical stuff anyway. And for parsing configuration, general logic and image layout planing it seems to me that it would make sense to use something more python-ish... But that's just my opinion :-) |
It depends on the image types. The stuff we do in |
For instance, this will allow us to build images using one generic config:
Also if none
*.dtb
were found, that should be not an error.The text was updated successfully, but these errors were encountered: