l...@gnu.org (Ludovic Courtès) writes: > Hi Brian, > > Thanks for the patches! > > I haven’t look at the other patch yet, but about this one: > > BT Templeton <b...@hcoop.net> writes: > >> +#!/bin/sh > > Can you add a copyright/license header here? > >> +snarf_test () >> +{ >> + local x >> + x=$(snarf "$1") >> + if [ x"$x" != x"$2" ]; then > > ‘local’ and ‘$(...)’ are Bash extensions. > That's not true for '$(...)', see SUSv3, Section 2.6.3.
'local' is strictly speaking a non-POSIX extension, but is very widely implemented (for instance, it is one of the few extensions allowed by Debian's policy[0], and seems also supported by FreeBSD's /bin/sh [1]). If the script would be significanly more burdensome if expressed without 'local', it would IMHO make sense to at least contemplate the issue. [0] http://www.debian.org/doc/debian-policy/ch-files.html#s-scripts [1] http://www.freebsd.org/cgi/man.cgi?query=sh&format=html Regards, Rotty -- Andreas Rottmann -- <http://rotty.yi.org/>