Opened 6 years ago

Last modified 6 years ago

#789 new bug

surf vs surf-alggeo

Reported by: ren Owned by: hannes
Priority: minor Milestone: 4-2-0 and higher
Component: dontKnow Version: 4-1-0
Keywords: Cc:


The visualization package 'surf' has been included in the repository of Debian and Ubuntu under the name 'surf-alggeo':

It would be good if surf.lib would be able to find out whether to call 'surf' or 'surf-alggeo'. Under Linux, this could be done with:

string surfCommand;
proc mod_init()
  string pathToSurf = getShellOutput("command -v surf-alggeo");
  surfCommand = pathToSurt[size(pathToSurf)-10..size(pathToSurf)];
  if (surfCommand != "surf-alggeo")
    surfCommand = "surf";

Not sure how to a solution would look like that would also work under Windows and MacOs?.

Change History (2)

comment:1 Changed 6 years ago by hannes

It would be easier (and faster) to use

string surfCommand=system("executable","surf-alggeom");
if (surfCommand==""){ surfCommand=system("executable","surf");}
if (surfCommand=="") {ERROR("surf not found");}

comment:2 Changed 6 years ago by hannes

Owner: changed from somebody to hannes
Note: See TracTickets for help on using tickets.