[Libguestfs] [PATCH nbdkit 08/10] freebsd: In scripts use 'env bash' instead of '/bin/bash'.

Richard W.M. Jones rjones at redhat.com
Mon Aug 13 21:23:23 UTC 2018


On Mon, Aug 13, 2018 at 04:14:13PM -0500, Eric Blake wrote:
> On 08/12/2018 03:51 AM, Richard W.M. Jones wrote:
> >The path to bash on FreeBSD is /usr/local/bin/bash.
> >---
> 
> >+++ b/docs/make-links.sh
> >@@ -1,4 +1,4 @@
> >-#!/bin/bash -
> >+#!/usr/bin/env bash
> 
> This loses the '-' argument that used to be passed by the kernel
> (but you can't add it back to the #! linew without using BSD's or
> GNU coreutils' recent addition of 'env -S').  Is it worth adding a
> 'set -' line later in the script to compensate, if you were
> previously passing the '-' as a way to reset the shell from
> inheriting environmental differences?

I actually had no idea what the '-' did until now :-)

I guess we need it.  I can add

  set -

to these scripts as required.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW




More information about the Libguestfs mailing list