Skip to content

Conversation

@lightmare
Copy link
Collaborator

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 for basename 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:

find ${LIB_FOLDERS} -name "*.a" | xargs basename | sort | uniq

basename suitable table prints sui
basename foo bar gaz fails with basename: 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 saying sort -u.

And finally, this wasn't deleting anything:

rm -rf "${LIB_FOLDERS}"

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.

1 participant