This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 7/7/08, Martin Guy <martinwguy@yahoo.it> wrote: > The best answer is to remove bashisms There's a debian perl script checkbashisms which can help with this (if it matters). I've run it over the scripts and there are a dozen or so trivial bashisms that are not necessary. Unfortunately it's not clear enough from the code what you are trying to achieve in certain places, like . tsocks where tsocks is neither a shell function nor a local shell script. Do you happen to know that it's implemented as a shell script on your system and think to save a millisecond? Does tsocks need to set shell variables in the same environment that are then picked up in the parent program? Does it matter if tsocks happens to use the same local variable name as CT and modifies them at random? and ${CT_PROXY_TYPE/socks} which doesn't conform to anything in the bash manual. The bash implementation I tried it on behaves the same as bash's ${CT_PROXY_TYPE/socks/} i.e., turn the first occurrence of "socks" into "" if it exists. I'd code that some otherway, or at least say what that piece of code is supposed to achieve. Given puzzles like these I'm not confident to just fix them and send patches, regarding these constructs as obscure puzzles to bu guessed at rather than the lucid form of communication to other programmers that code should be :) However, I attach the latest version of the checkbashisms perl script in case this is useful. The only thing you use that's hard to get round portably is "echo -n", though there is a portable hack defining a shell fn echo_n() in the good article on shell portability http://www.linux.com/articles/34658 M
Attachment:
checkbashisms
Description: Binary data
-- For unsubscribe information see http://sourceware.org/lists.html#faq
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |