mason_build: fix creating universal binary #693
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.
Forewarning: I'm not doing / testing anything with this
if [ "${MASON_PLATFORM}" = 'ios' ]
branch, so please someone double check these changes. I've just stumbled upon it while grepping forbasename
which is still giving me errors, and although those errors were coming from elsewhere (as I'm running it on linux), I decided to fix this part as well.First simple stuff, I made
LIB_FOLDERS
local because it seems to only be used here, and changed to+=
assignment because why not. (Originally I wanted to make that variable an array, but seeing how the rest of the code strongly assumes no spaces in paths, one array wouldn't change that).Then this part:
basename suitable table
printssui
basename foo bar gaz
fails withbasename: extra operand ‘gaz’
Maybe it was meant to be
xargs basename -a
, but POSIX basename doesn't know-a
.Luckily basename can easily be done with sed (here we don't even hit any weird cases so it's trivial).
sort | uniq
is just an ancient way of sayingsort -u
.And finally, this wasn't deleting anything:
rm -rf "${LIB_FOLDERS}"