Bug #850

isogmt can not run script

Added by Dongdong almost 2 years ago. Updated almost 2 years ago.

Status:ClosedStart date:2016-01-23
Priority:NormalDue date:
Assignee:Remko% Done:

100%

Category:-
Target version:Candidate for next bugfix release
Affected version:5.2-svn Platform:Linux

Description

$ isogmt sh test.sh
...
...
ERROR: No module named sh was found.  This could mean one of three things:
...
...

Associated revisions

Revision 15477
Added by Remko almost 2 years ago

Check is command given to isogmt is a module.
This fixes issue #850.

Revision 15478
Added by Remko almost 2 years ago

Merge from ^/branches/5.2.2
Check if command given to isogmt is a module.
This fixes issue #850.

History

#1 Updated by Paul almost 2 years ago

  • Status changed from New to In Progress

I cannot see how the current script could possibly run anything but a module since it always starts with gmt $*.
Could you change

gmt "$@" 

to just
"$@" 

and let me know if that works as expected.

#2 Updated by Dongdong almost 2 years ago

The documentation (http://gmt.soest.hawaii.edu/doc/5.2.1/isogmt.html) says that:

isogmt runs a single GMT command or shell script in isolation mode.

so I tried "isogmt sh test.sh".

Changing

gmt "$@"

to
"$@"

works for scripts, but it is not a good solution. If GMT_INSTALL_MODULE_LINKS is set to be FALSE during GMT installation, it may make commands like `isogmt psxy` fail.

#3 Updated by Remko almost 2 years ago

Dongdong is right. There are two things wrong with isogmt:
  1. The description of what isogmt does is wrong, as it currently cannot run a shell script.
  2. If we fix this by replacing
    gmt "$@"
    by
    "$@"
    or just
    $@
    then it cannot work on a module (as replacement of gmt)

I think we need to rethink this and have isogmt work right both on modules and scripts, as advertised. It will require some switch.

#4 Updated by Remko almost 2 years ago

  • Status changed from In Progress to Resolved

This should be fixed now in r15477 (GMT5.2) and r15478 (GMT5.3).
Please, Dongdong, check if this works for you.

#5 Updated by Remko almost 2 years ago

  • Assignee set to Remko
  • % Done changed from 0 to 100

#6 Updated by Dongdong almost 2 years ago

Yes, it works now.

#7 Updated by Remko almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF