comparison scripts/pkg/private/expand_rel_paths.m @ 31132:cf5f46b2e052 stable

pkg: Replace OCTAVE_HOME in PREFIX and ARCHPREFIX independently (bug #62681). * scripts/pkg/private/expand_rel_paths.m: The PREFIX and ARCHPREFIX might point to directories outside OCTAVE_HOME independently. Also only replace "__OH__" if it is at the start of the respective strings.
author Markus Mützel <markus.muetzel@gmx.de>
date Fri, 08 Jul 2022 12:57:22 +0200
parents 796f54d4ddbf
children 07e52e612ea2
comparison
equal deleted inserted replaced
31131:65c4d98352d3 31132:cf5f46b2e052
32 32
33 ## Prepend location of OCTAVE_HOME to install directories 33 ## Prepend location of OCTAVE_HOME to install directories
34 loc = OCTAVE_HOME (); 34 loc = OCTAVE_HOME ();
35 for i = 1:numel (pkg_list) 35 for i = 1:numel (pkg_list)
36 ## Be sure to only prepend OCTAVE_HOME to pertinent package paths 36 ## Be sure to only prepend OCTAVE_HOME to pertinent package paths
37 if (strncmpi (pkg_list{i}.dir, "__OH__", 6)) 37 pkg_list{i}.dir = regexprep (pkg_list{i}.dir, "^__OH__", loc);
38 pkg_list{i}.dir = [ loc pkg_list{i}.dir(7:end) ]; 38 pkg_list{i}.archprefix = regexprep (pkg_list{i}.archprefix, ...
39 pkg_list{i}.archprefix = [ loc pkg_list{i}.archprefix(7:end) ]; 39 "^__OH__", loc);
40 endif
41 endfor 40 endfor
42 41
43 endfunction 42 endfunction