Skip to content
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

Allow for multiple rootfs additions. #269

Merged
merged 1 commit into from
Apr 22, 2018

Conversation

ConnorRigby
Copy link
Member

This allows for a user to supply a list of additions or a single string.

@@ -92,6 +92,9 @@ defmodule Mix.Tasks.Firmware do
rootfs_overlay =
case firmware_config[:rootfs_overlay] || firmware_config[:rootfs_additions] do
nil -> []
overlays when is_list(overlays) ->
Enum.map(overlays, fn(overlay) -> ["-a", Path.join(File.cwd!(), overlay)] end)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor, but you can use Enum.flat_map/2 and do this in one step.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yes, i always forget about flat_map/2

@mobileoverlord mobileoverlord merged commit a0de168 into master Apr 22, 2018
@fhunleth fhunleth deleted the feature/multiple-additions branch April 22, 2018 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants