[GRASS-dev] [bug #5499] (grass) bash scripts starting with
#!/bin/sh
Patricio Antonio Toledo Peña
patricioantoniotoledo at gmail.com
Wed Feb 21 09:06:29 EST 2007
Maybe
#!/usr/bin/env bash
instead of
#!/bin/bash
will solve the uncertainities of localization
2007/2/21, Glynn Clements <glynn at gclements.plus.com>:
>
>
> Hamish wrote:
>
> > 2) keep #!/bin/sh, but add this within the script:
> >
> > if [ -z "$BASH" ] ; then
> > echo "$0: This script requires Bash." 1>&2
> > exit 1
> > fi
>
> Or:
> if [ -z "$BASH" ] ; then
> exec bash "$0" "$@"
> echo "$0: This script requires Bash." 1>&2
> exit 1
> fi
>
> AFAICT, that should work so long as bash is called "bash" (and not
> e.g. "bash2" or "bash-3.1.17") and is somewhere in the path.
>
> --
> Glynn Clements <glynn at gclements.plus.com>
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-dev/attachments/20070221/fff837b5/attachment.html
More information about the grass-dev
mailing list