Hi,

On 08/18/2015 08:59 PM, Matt Turner wrote:
On Tue, Jul 21, 2015 at 2:08 PM, Vinson Lee <v...@freedesktop.org> wrote:
Fixes 'make check' on FreeBSD.

Signed-off-by: Vinson Lee <v...@freedesktop.org>
---

Seems fine to me.

Reviewed-by: Matt Turner <matts...@gmail.com>

At the same time, I don't have any idea if the scripts actually rely
on bash itself. I think I've heard that Debian has a tool to detect
bash-dependencies in shell scripts that might be of some use.

Debian "devscripts" package contains "checkbashisms".

I've used it to make my own scripts POSIX / Busybox shell compliant and it has worked fine for me.


        - Eero

PS. About only Bashism that is hard to do in POSIX shell is array accesses. E.g. most things where string slices are used, can also be done with POSIX string operations. For example:
        extension=${str##*\.}
        if [ $extension = "gz" ]; then
        ...

(Diligent shell programmer would have as first check:
        if [ "$extension" = "$str" ]; then
                # no extension
                return
        fi

)

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to