[GRASS-dev] v.line.center port to G7

Hamish hamish_b at yahoo.com
Wed Jun 19 03:57:21 PDT 2013





Johannes wrote:
>>  As I could not find any other shell script in that folder
>> I am not sure if  the problem is the shell script in general?
>> Attached the slightly adapted  script (v.to.db, v.segment).

Luca wrote:
> bash it doesn't work more with grass7, you have to convert it
> in python ;-)

Sure Bash shell scripts work with GRASS 7, as do classic Bourne,
C-shell, Perl, PHP and whatever else. I'm doing that all the time.
In many cases Bash is the quickest and cleanest way to do the
job. (just cut and paste a few recent lines from the recent
command line history) Other times it is horrible and you want a
real programming language.

What doesn't work out of the box is the Script.make build support,
but since building and installing shell scripts is just copying
the file into your personal $GRASS_ADDON_PATH dir and making sure
the file is executable, it's not a big problem.

For GRASS 7 it is encouraged to write scripts meant to be used by
others in a more platform-independent language, so that MS Windows
users don't stay second-class citizens as they have been until
now, and we can do away with a lot of the sort-of-working unix-on-
Windows kludges and errors due to missing UNIX powertools,
features, etc.

But if the script is just for you, use whatever language you like.
If GRASS doesn't support that it's a bad bug. Likewise, getting
python scripts working reliably on WinGRASS 6.4 is a pretty
critical bug which we haven't figured out yet. Even though the
core-provided scripts there are all written in Bourne shell we
should still support it for users' personal scripts and
interoperability between versions.


regards,
Hamish



More information about the grass-dev mailing list