strip-linguas got broken by a BSD compatibility patch. Now, it misbehaves on any system equally :) The patch essentially did a tr ' ' '\n' on GNU/Linux, when strip-linguas relied on spaces. Here's a patch that fixes this, and cleans up a little bit. I ran into this with sawfish. It claimed any LINGUAS value was invalid, even those for which translations exist.
Created attachment 87707 [details, diff] patch
executing `basename` is just retarded as it slows things down
i merged the find/hasq changes but i dont quite get this: - for d in "$@" ; do + for d ; do
> i merged the find/hasq changes but i dont quite get this: > - for d in "$@" ; do > + for d ; do in "$@" is implied if nothing is given after the variable name, there's no need to state it. in "$@" works as well, so if you'd rather leave it, that's fine too; style can be discussed without ever agreeing :)
for d ; do isnt very intuitive things should be fixed in cvs now ... if you feel like rewriting it so it doesnt -exec basename, i'd be happy ;)
Giving the basename's work to sed might help a lot. See some tests: # ls=$(find /usr/portage -name '*.ebuild' -exec basename {} .ebuild \;) real 0m14.910s # ls=$(find /usr/portage -name '*.ebuild' | sed 's:.*/\([^/]*\).ebuild:\1:') real 0m1.169s (In reply to comment #2) > executing `basename` is just retarded as it slows things down > Hmm, but a much more retarded than this would be the old instruction "ls=${ls//.po}", present in r1.235, which could lock up bash if it had a lot of work to do.
> Giving the basename's work to sed might help a lot. See some tests: i dont really undertand this sentence, but using sed seems like it'd be kind of a pain to extra all the right data > Hmm, but a much more retarded than this would be the old instruction > "ls=${ls//.po}", present in r1.235, which could lock up bash if it had a lot > of work to do. if by "a lot of work" you mean "ls is a string whose length is many kilobytes long", then yes you are correct but considering that use case is in the realm of very very unlikely, your point has not value