annotate scripts/pkg/private/make_rel_paths.m @ 30564:796f54d4ddbf stable

update Octave Project Developers copyright for the new year In files that have the "Octave Project Developers" copyright notice, update for 2021. In all .txi and .texi files except gpl.txi and gpl.texi in the doc/liboctave and doc/interpreter directories, change the copyright to "Octave Project Developers", the same as used for other source files. Update copyright notices for 2022 (not done since 2019). For gpl.txi and gpl.texi, change the copyright notice to be "Free Software Foundation, Inc." and leave the date at 2007 only because this file only contains the text of the GPL, not anything created by the Octave Project Developers. Add Paul Thomas to contributors.in.
author John W. Eaton <jwe@octave.org>
date Tue, 28 Dec 2021 18:22:40 -0500
parents c23dafed5ffd
children 597f3ee61a48
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 ##
30564
796f54d4ddbf update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 30376
diff changeset
3 ## Copyright (C) 2019-2022 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 ##
30376
c23dafed5ffd maint: Use same Copyright code block in all files.
Rik <rik@octave.org>
parents: 29358
diff changeset
8 ## Octave is free software: you can redistribute it and/or modify
27707
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 ##
30376
c23dafed5ffd maint: Use same Copyright code block in all files.
Rik <rik@octave.org>
parents: 29358
diff changeset
13 ## Octave is distributed in the hope that it will be useful,
27707
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
30376
c23dafed5ffd maint: Use same Copyright code block in all files.
Rik <rik@octave.org>
parents: 29358
diff changeset
19 ## along with Octave; see the file COPYING. If not, see
c23dafed5ffd maint: Use same Copyright code block in all files.
Rik <rik@octave.org>
parents: 29358
diff changeset
20 ## <https://www.gnu.org/licenses/>.
c23dafed5ffd maint: Use same Copyright code block in all files.
Rik <rik@octave.org>
parents: 29358
diff changeset
21 ##
c23dafed5ffd maint: Use same Copyright code block in all files.
Rik <rik@octave.org>
parents: 29358
diff changeset
22 ########################################################################
27707
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
23
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
24 ## -*- texinfo -*-
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
25 ## @deftypefn {} {@var{pkg_list} =} make_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
26 ## Internal undocumented function.
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
27 ## @end deftypefn
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
28
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
29 function pkg_list = make_rel_paths (pkg_list)
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
30
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
31 ptn = ["^" strrep(canonicalize_file_name (OCTAVE_HOME), '\', '\\')];
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
32
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
33 ## Strip pkg install directories from OCTAVE_HOME
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
34 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
35 pkg_list{i}.dir = canonicalize_file_name (pkg_list{i}.dir);
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
36 pkg_list{i}.dir = regexprep (pkg_list{i}.dir, ptn, "__OH__");
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
37 pkg_list{i}.archprefix = canonicalize_file_name (pkg_list{i}.archprefix);
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
38 pkg_list{i}.archprefix = regexprep (pkg_list{i}.archprefix, ptn, "__OH__");
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
39 endfor
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
40
377f069841c1 Make packages installation dirs in global octave_packages file relative
Philip Nienhuis <prnienhuis@users.sf.net>
parents:
diff changeset
41 endfunction