source: trunk/src/call_command_clean.m @ 1136

Last change on this file since 1136 was 1136, checked in by augier3pi, 8 weeks ago

Fix launching fluidimage

File size: 385 bytes
Line 
1%'call_command_clean': call a command with LD_LIBRARY_PATH cleaned
2
3function [status, result]=call_command_clean(command)
4
5paths = strsplit(getenv('LD_LIBRARY_PATH'), ':');
6cc = regexp(paths, 'matlab/');
7new_paths = paths(cellfun('isempty', cc));
8clean_ld_lib_path = strjoin(new_paths, ':');
9
10[status, result] = system(['LD_LIBRARY_PATH=' clean_ld_lib_path ' ' command], '-echo');
11end
Note: See TracBrowser for help on using the repository browser.