1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
%1
dirlist = {"geom2d","io","polygons2d","shape2d","octclip", "graphs"};
dirname = fileparts (canonicalize_file_name (mfilename ("fullpath")));
%% If we are in Architecture dependent folder add from outside
arch = cstrcat (octave_config_info ("canonical_host_type"),
"-", octave_config_info ("api_version"));
pp = strsplit (dirname,filesep (), true);
if strcmp(arch , pp{end})
dirname = [strcat(filesep(),{pp{1:end-1}}){:}];
end
if (! exist (fullfile (dirname, "inst"), "dir"))
for ii=1:length (dirlist)
addpath ( [ dirname filesep dirlist{ii}],"-end")
endfor
else
warning("geometry:Devel","Adding path for testing.");
for ii=1:length(dirlist)
addpath ([ dirname "/inst/" dirlist{ii}])
endfor
endif
warning('off', 'Octave:fopen-file-in-path');
clear dirlist dirname pp
|