Hi all,
Will the shell change to dash from bash in linux affect any GRASS startup scripts now ? Are they all ported to dash? Most of scripts worked with bash doesn’t work with dash and Ubuntu changed to dash by default. So when referring to /bin/sh its actually /bin/dash and loops and some increment operators wont work with dash. So does GRASS GIS sets its shell to be bash/dash shell instead of /bin/sh which in some distro maybe bash and dash in others.
–
Regards,
Rashad
On Sun, Dec 8, 2013 at 11:50 PM, Rashad M <mohammedrashadkm@gmail.com> wrote:
Hi all,
Will the shell change to dash from bash in linux affect any GRASS startup
scripts now ? Are they all ported to dash?
Note that dash is Ubuntu specific (and/or Debian, no idea).
For example, on Fedora there is
/bin/sh -> bash
Most of scripts worked with bash
doesn't work with dash and Ubuntu changed to dash by default. So when
referring to /bin/sh its actually /bin/dash and loops and some increment
operators wont work with dash.
The overall idea in GRASS is to avoid bash-isms at all and to stick to Bourne
shell syntax.
So does GRASS GIS sets its shell to be
bash/dash shell instead of /bin/sh which in some distro maybe bash and dash
in others.
While ideally all scripts should be Bourne shell a few are explicitely
bash scripts [1] or not properly ported (in case to be fixed!).
Markus
[1] result of find/grep in G65:
./mswindows/osgeo4w/msys.bat:start "%WD%mintty" /bin/bash -l
./tools/sql.sh:#!/bin/bash
./lib/init/init.sh: export SHELL=/usr/bin/bash.exe
./lib/vector/dglib/examples/rtest03.sh:#!/bin/bash
./scripts/r.tileset/r.tileset:#!/bin/bash
./scripts/i.spectral/i.spectral:#!/bin/bash
./vector/v.clean/test/v.clean.test:#!/bin/bash
--> essentially only r.tileset and i.spectral