[PATCH] gen_build_files.sh: Remove bashisms
Rob Landley
rob at landley.net
Sat May 15 02:30:54 UTC 2010
On Friday 14 May 2010 15:52:52 Peter Tyser wrote:
> On Fri, 2010-05-14 at 15:41 -0500, Rob Landley wrote:
> > On Thursday 13 May 2010 18:05:53 Peter Tyser wrote:
> > > Using 'read' without a variable is not supported in many shells. Lines
> > > such as 'while read; do' in gen_build_files.sh would result in build
> > > failures when using sh or dash as an interpreter:
> >
> > Simple fix: say #!/bin/bash at the top of all shell scripts, always.
>
> With the exception of fix_ws.sh, all other shell scripts in scripts/
> use /bin/sh. I had assumed this was intentional?
The history of Linux is that Linus Torvalds taught his term program to handle
the system calls for "bash" so he could have a command line to mkdir, rename,
and delete files without having to reboot into minix. (Torvalds described it
in his biography "Just for Fun" as "My terminal emulator grew legs". Page 60-
something I think, don't have my copy with me and the books.google.com preview
is ironically crippled.)
I.E. the first userspace program Linx ever ran was bash. It was the default
shell of Linux _before_ the 0.0.1 release. The reason Linux turned into a
Unix kernel was, explicitly, to run bash.
And you're objecting to treating Bash as the default shell of Linux.
> Unless there is a
> specific bashism that makes gen_build_files.sh much cleaner/better/etc,
> why not keep it portable?
Would you like me to come up with some?
Rob
--
Latency is more important than throughput. It's that simple. - Linus Torvalds
More information about the busybox
mailing list