script with ${SH} instead of /bin/sh since some OSes have dumb /bin/sh, e.g. Solaris. From pkg/22914 by Jonathan Perkin.