-
Notifications
You must be signed in to change notification settings - Fork 20
Consolidate board specific files #156
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This leads to an ugly
./directory as a tar entry, which seems barely worth the--transform. I guess this is because--transformwon't eliminate something entirely.I'm not sure why you want to strip out
./, but given that you do and assuming you don't mind about missing dotfiles, maybe(cd "${latest_kernel}" && tar -cvzf ... *)instead? To include dotfiles there's eithershopt -s dotfiles(but I think that's bash only) or something like(cd "${latest_kernel}" && find -mindepth 1 -print0|cut -zd/ -f2-|tar --verbatim-files-from --files-from=- --null -cvzf ...)This is probably not worth adjusting unless you want to :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you guessed, I added the transform to avoid ./ in pathnames in the tar archive. This is to preserve the same path structure as in the previous version, were specific relative dtb files were specified (without ./).
The dtb pathnames are specified in a different file, flash.yaml, as part of the board specific metadata; it would be ugly to have ./ names in there, but I guess I could also prepend it when calling tar -x. The ./ felt like gratuitous pollution of dtbs.tar.gz, so I found this --transform way of stripping them.
I can switch to
cd $dir && tarinstead of -C + --transform, I guess this is easier to read but I wanted to avoid relying on globing in case for a weird reason a kernel comes with no dtb (which isn't really an use case, and then perhaps the directory wouldn't exist either).I don't think there are dotfiles in there to grab; the
find | cut | tarwould be painful to read.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the glob is empty, then it will remain by default and the tar will then fail I think - perhaps that's what we want?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, trying to move to cd, the two things that scratch me with these few lines are:
So if you don't mind, I'd prefer keeping tar in the current directory with the slightly unusual --transform, it's confirmed to work by you.