[llvm] r257663 - Remove bashism from merge.sh: POSIX sh does not have the `function`
Dimitry Andric via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 19 10:14:42 PST 2016
On 19 Jan 2016, at 18:12, Hans Wennborg <hans at chromium.org> wrote:
>
> On Sat, Jan 16, 2016 at 7:20 AM, Dimitry Andric <dimitry at andric.com> wrote:
...
>> Of the /bin/sh scripts, only utils/release/export.sh and utils/release/tag.sh use the 'function' keyword, and for both files these can be safely deleted. They seem to run fine under FreeBSD /bin/sh.
>>
>> So I think I'll just go ahead and fix up export.sh and tag.sh in a follow-up commit.
>
> I just worry that keeping these scripts free from bashisms is an
> uphill battle since we don't have anything preventing them slipping in
> again. Because of that, I figure using "#!/usr/bin/env bash" would be
> a better solution.
Yes, you may be right about that. Most Linux users expect to use bash
constructs anyway, though usually #!/bin/bash is then used. Only Debian
(and derivatives) seem to default to a non-bash /bin/sh. OSX also has
bash as /bin/sh, so I guess the BSD's are the odd man out here.
(Windows doesn't count, obviously. :)
> I don't feel particularly strongly here though, and if you do want to
> keep these scripts bashism free, that's fine too.
Since quite a number of scripts in the tree require bash, it is already
a de facto requirement for building LLVM and friend, I guess. Keeping
all bashisms out is maybe a bit too much like fighting windmills, I
guess.
-Dimitry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160119/30f56657/attachment.sig>
More information about the llvm-commits
mailing list