annotate scripts/pkg/private/expand_rel_paths.m @ 28892:3cac3ceb9629

maint: Use coding style with parentheses after function name to distinguish from a variable. * audiorecorder.m, interp3.m, iscolormap.m, spinmap.m, expm.m, copyfile.m, delete.m, edit.m, inputParser.m, movefile.m, narginchk.m, nargoutchk.m, publish.m, tar.m, tempdir.m, ode23.m, ode23s.m, ode45.m, odeplot.m, sqp.m, matlabroot.m, savepath.m, expand_rel_paths.m, datetick.m, lighting.m, material.m, rticks.m, shading.m, thetaticks.m, view.m, xticklabels.m, xticks.m, yticklabels.m, yticks.m, zticklabels.m, zticks.m, colorbar.m, errorbar.m, hist.m, isocaps.m, light.m, line.m, patch.m, shrinkfaces.m, stairs.m, surface.m, allchild.m, ancestor.m, cla.m, clf.m, findobj.m, gca.m, hggroup.m, isgraphics.m, ishandle.m, print.m, struct2hdl.m, arch_rnd.m, speed.m, clock.m: Use parentheses '()' after function invocation to distinguish between a variable and a function.
author Rik <rik@octave.org>
date Sat, 10 Oct 2020 17:55:56 -0700
parents 9f9ac219896d
children d39b09b4c5db
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
1 ########################################################################
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
2 ##
27919
1891570abac8 update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 27918
diff changeset
3 ## Copyright (C) 2019-2020 The Octave Project Developers
27918
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 27707
diff changeset
4 ##
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
5 ## See the file COPYRIGHT.md in the top-level directory of this
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
6 ## distribution or <https://octave.org/copyright/>.
27707
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
7 ##
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
8 ## This program is free software: you can redistribute it and/or modify
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
9 ## it under the terms of the GNU General Public License as published by
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
10 ## the Free Software Foundation, either version 3 of the License, or
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
11 ## (at your option) any later version.
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
12 ##
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
13 ## This program is distributed in the hope that it will be useful,
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
14 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
15 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
16 ## GNU General Public License for more details.
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
17 ##
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
18 ## You should have received a copy of the GNU General Public License
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
19 ## along with this program. If not, see <https://www.gnu.org/licenses/>.
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
20
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
21 ## -*- texinfo -*-
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
22 ## @deftypefn {} {@var{pkg_list} =} expand_rel_paths (@var{pkg_list})
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
23 ## Internal undocumented function.
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
24 ## @end deftypefn
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
25
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
26 function pkg_list = expand_rel_paths (pkg_list)
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
27
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
28 ## Prepend location of OCTAVE_HOME to install directories
28892
3cac3ceb9629 maint: Use coding style with parentheses after function name to distinguish from a variable.
Rik <rik@octave.org>
parents: 27985
diff changeset
29 loc = OCTAVE_HOME ();
27707
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
30 for i = 1:numel (pkg_list)
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
31 ## Be sure to only prepend OCTAVE_HOME to pertinent package paths
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
32 if (strncmpi (pkg_list{i}.dir, "__OH__", 6))
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
33 pkg_list{i}.dir = [ loc pkg_list{i}.dir(7:end) ];
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
34 pkg_list{i}.archprefix = [ loc pkg_list{i}.archprefix(7:end) ];
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
35 endif
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
36 endfor
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
37
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
38 endfunction