annotate build-aux/update-bug-status.sh @ 27919:1891570abac8

update Octave Project Developers copyright for the new year In files that have the "Octave Project Developers" copyright notice, update for 2020.
author John W. Eaton <jwe@octave.org>
date Mon, 06 Jan 2020 22:29:51 -0500
parents b442ec6dda5c
children bd51beb6205e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23572
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
1 #! /bin/sh
24537
11729ca6eb81 Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents: 23572
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) 2017-2020 The Octave Project Developers
27918
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 26945
diff changeset
4 #
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 26945
diff changeset
5 # See the file COPYRIGHT.md in the top-level directory of this distribution
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 26945
diff changeset
6 # or <https://octave.org/COPYRIGHT.html/>.
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 26945
diff changeset
7 #
24537
11729ca6eb81 Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents: 23572
diff changeset
8 #
11729ca6eb81 Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents: 23572
diff changeset
9 # This file is part of Octave.
11729ca6eb81 Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents: 23572
diff changeset
10 #
11729ca6eb81 Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents: 23572
diff changeset
11 # Octave is free software: you can redistribute it and/or modify it
11729ca6eb81 Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents: 23572
diff changeset
12 # under the terms of the GNU General Public License as published by
11729ca6eb81 Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents: 23572
diff changeset
13 # the Free Software Foundation, either version 3 of the License, or
11729ca6eb81 Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents: 23572
diff changeset
14 # (at your option) any later version.
11729ca6eb81 Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents: 23572
diff changeset
15 #
11729ca6eb81 Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents: 23572
diff changeset
16 # Octave is distributed in the hope that it will be useful, but
11729ca6eb81 Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents: 23572
diff changeset
17 # WITHOUT ANY WARRANTY; without even the implied warranty of
11729ca6eb81 Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents: 23572
diff changeset
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11729ca6eb81 Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents: 23572
diff changeset
19 # GNU General Public License for more details.
11729ca6eb81 Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents: 23572
diff changeset
20 #
11729ca6eb81 Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents: 23572
diff changeset
21 # You should have received a copy of the GNU General Public License
11729ca6eb81 Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents: 23572
diff changeset
22 # along with Octave; see the file COPYING. If not, see
11729ca6eb81 Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents: 23572
diff changeset
23 # <https://www.gnu.org/licenses/>.
23572
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
24
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
25 bug_numbers=$(for file in "$@"; do
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
26 sed -n "s/.*<\([0-9][0-9][0-9][0-9]*\)>.*/\1/p" "$file"
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
27 done | sort -u)
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
28
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
29 fixed_bug_numbers=$(for num in $bug_numbers; do
26945
05db50358377 * update-bug-status.sh: Delete newline chars in wget output
John W. Eaton <jwe@octave.org>
parents: 26376
diff changeset
30 status=$(wget -q -O - https://octave.org/testfailure/?$num | tr -d '\n' | sed -n 's/.*>Status:<\/span><\/span>&nbsp;<\/td> *<td valign="middle" width="35%">\([^<]*\)<.*/\1/p');
23572
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
31 if [ "$status" = "Fixed" ]; then echo "$num"; fi
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
32 done)
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
33
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
34 if [ -z "$fixed_bug_numbers" ]; then
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
35 echo "no change in bug status"
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
36 exit 0;
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
37 fi
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
38
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
39 fixed_bug_pattern=`echo $fixed_bug_numbers | sed 's/ /\\\\|/g; s/^/<\\\\(/; s/$/\\\\)>/'`
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
40
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
41 for file in "$@"; do
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
42 sed -i "s/$fixed_bug_pattern/<*\1>/" "$file"
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
43 done