Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8
提交
538d244e
D
dragonwell8
项目概览
openanolis
/
dragonwell8
通知
5
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
538d244e
编写于
12月 28, 2010
作者:
O
ohair
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6962318: Update copyright year
Reviewed-by: xdono
上级
bff706ff
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
195 addition
and
6 deletion
+195
-6
make/Defs-internal.gmk
make/Defs-internal.gmk
+1
-1
make/deploy-rules.gmk
make/deploy-rules.gmk
+1
-1
make/hotspot-rules.gmk
make/hotspot-rules.gmk
+1
-1
make/install-rules.gmk
make/install-rules.gmk
+1
-1
make/jprt.gmk
make/jprt.gmk
+1
-1
make/sanity-rules.gmk
make/sanity-rules.gmk
+1
-1
make/scripts/update_copyright_year.sh
make/scripts/update_copyright_year.sh
+189
-0
未找到文件。
make/Defs-internal.gmk
浏览文件 @
538d244e
#
# Copyright (c) 1995, 20
09
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1995, 20
10
, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
...
...
make/deploy-rules.gmk
浏览文件 @
538d244e
#
# Copyright (c) 2002, 20
09
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2002, 20
10
, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
...
...
make/hotspot-rules.gmk
浏览文件 @
538d244e
#
# Copyright (c) 2001, 20
09
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2001, 20
10
, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
...
...
make/install-rules.gmk
浏览文件 @
538d244e
#
# Copyright (c) 2002, 20
09
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2002, 20
10
, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
...
...
make/jprt.gmk
浏览文件 @
538d244e
#
# Copyright (c) 2006, 20
09
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2006, 20
10
, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
...
...
make/sanity-rules.gmk
浏览文件 @
538d244e
#
# Copyright (c) 2001, 20
09
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2001, 20
10
, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
...
...
make/scripts/update_copyright_year.sh
0 → 100644
浏览文件 @
538d244e
#!/bin/sh -f
#
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# Script to update the Copyright YEAR range in Mercurial sources.
# (Originally from xdono, Thanks!)
if
[
"
`
uname
-s
`
"
=
"SunOS"
]
;
then
awk
=
nawk
else
awk
=
awk
fi
# Stop on any error
set
-e
# Temp area
tmp
=
/tmp/
`
basename
$0
`
.
${
USER
}
.
$$
rm
-f
-r
${
tmp
}
mkdir
-p
${
tmp
}
total
=
0
# This year or supplied year
if
[
"
$1
"
!=
""
]
;
then
year
=
"
$1
"
else
year
=
`
date
+%Y
`
fi
# Return true if it makes sense to edit this file
saneFileToCheck
()
{
if
[
"
$1
"
!=
""
-a
-f
$1
]
;
then
isText
=
`
file
"
$1
"
| egrep
-i
'(text|source)'
|
cat
`
hasCopyright
=
`
grep
'Copyright'
"
$1
"
|
cat
`
lastLineCount
=
`
tail
-1
"
$1
"
|
wc
-l
`
if
[
"
${
isText
}
"
!=
""
\
-a
"
${
hasCopyright
}
"
!=
""
\
-a
${
lastLineCount
}
-eq
1
]
;
then
echo
"true"
else
echo
"false"
fi
else
echo
"false"
fi
}
# Update the copyright year on a file
updateFile
()
# file
{
changed
=
"false"
if
[
`
saneFileToCheck
"
$1
"
`
=
"true"
]
;
then
copyright
=
"Copyright (c)"
company
=
"Oracle"
rm
-f
$1
.OLD
mv
$1
$1
.OLD
cat
$1
.OLD |
\
sed
-e
"s@
\(
${
copyright
}
[12][0-9][0-9][0-9],
\)
[12][0-9][0-9][0-9],
${
company
}
@
\1
${
year
}
,
${
company
}
@"
|
\
sed
-e
"s@
\(
${
copyright
}
[12][0-9][0-9][0-9],
\)
${
company
}
@
\1
${
year
}
,
${
company
}
@"
|
\
sed
-e
"s@
${
copyright
}
${
year
}
,
${
year
}
,
${
company
}
@
${
copyright
}
${
year
}
,
${
company
}
@"
\
>
$1
if
!
diff
-b
-w
$1
.OLD
$1
>
/dev/null
;
then
\
changed
=
"true"
rm
-f
$1
.OLD
else
rm
-f
$1
mv
$1
.OLD
$1
fi
fi
echo
"
${
changed
}
"
}
# Update the copyright year on all files changed by this changeset
updateChangesetFiles
()
# changeset
{
count
=
0
files
=
${
tmp
}
/files.
$1
rm
-f
${
files
}
hg log
--rev
$1
-v
--template
'{files}\n'
|
expand
\
|
${
awk
}
-F
' '
'{for(i=1;i<=NF;i++)print $i}'
\
>
${
files
}
if
[
-f
"
${
files
}
"
-a
-s
"
${
files
}
"
]
;
then
copyright
=
"Copyright (c)"
company
=
"Oracle"
fcount
=
`
cat
${
files
}
|
wc
-l
`
for
i
in
`
cat
${
files
}
`
;
do
if
[
`
updateFile
"
${
i
}
"
`
=
"true"
]
;
then
count
=
`
expr
${
count
}
'+'
1
`
fi
done
if
[
${
count
}
-gt
0
]
;
then
printf
" UPDATED year on %d of %d files.
\n
"
${
count
}
${
fcount
}
total
=
`
expr
${
total
}
'+'
${
count
}
`
else
printf
" None of the %d files were changed.
\n
"
${
fcount
}
fi
else
printf
" ERROR: No files changed in the changeset? Must be a mistake.
\n
"
set
-x
ls
-al
${
files
}
hg log
--rev
$1
-v
--template
'{files}\n'
hg log
--rev
$1
-v
--template
'{files}\n'
|
expand
\
|
${
awk
}
-F
' '
'{for(i=1;i<=NF;i++)print $i}'
set
+x
exit
1
fi
rm
-f
${
files
}
}
# Check if repository is clean
previous
=
`
hg status|wc
-l
`
if
[
${
previous
}
-ne
0
]
;
then
echo
"WARNING: This repository contains previously edited working set files."
echo
" hg status | wc -l =
`
hg status |
wc
-l
`
"
fi
# Get all changesets this year
all_changesets
=
${
tmp
}
/all_changesets
rm
-f
${
all_changesets
}
hg log
--no-merges
-v
-d
"
${
year
}
-01-01 to
${
year
}
-12-31"
--template
'{node}\n'
>
${
all_changesets
}
# Check changeset to see if it is Copyright only changes, filter changesets
if
[
-s
${
all_changesets
}
]
;
then
echo
"Changesets made in
${
year
}
:
`
cat
${
all_changesets
}
|
wc
-l
`
"
index
=
0
cat
${
all_changesets
}
|
while
read
changeset
;
do
index
=
`
expr
${
index
}
'+'
1
`
desc
=
${
tmp
}
/desc.
${
changeset
}
rm
-f
${
desc
}
echo
"------------------------------------------------"
hg log
--rev
${
changeset
}
--template
'{desc}\n'
>
${
desc
}
printf
"%d: %s
\n
%s
\n
"
${
index
}
"
${
changeset
}
"
"
`
cat
${
desc
}
|head
-1
`
"
if
cat
${
desc
}
| fgrep
-i
"Added tag"
>
/dev/null
;
then
printf
" EXCLUDED tag changeset.
\n
"
elif
cat
${
desc
}
| fgrep
-i
rebrand
>
/dev/null
;
then
printf
" EXCLUDED rebrand changeset.
\n
"
elif
cat
${
desc
}
| fgrep
-i
copyright
>
/dev/null
;
then
printf
" EXCLUDED copyright changeset.
\n
"
else
updateChangesetFiles
${
changeset
}
fi
rm
-f
${
desc
}
done
fi
if
[
${
total
}
-gt
0
]
;
then
echo
"---------------------------------------------"
echo
"Updated the copyright year on a total of
${
total
}
files."
if
[
${
previous
}
-eq
0
]
;
then
echo
"This count should match the count of modified files in the repository: hg status -m"
else
echo
"WARNING: This repository contained previously edited working set files."
fi
echo
" hg status -m | wc -l =
`
hg status
-m
|
wc
-l
`
"
else
echo
"---------------------------------------------"
echo
"No files were changed"
if
[
${
previous
}
-ne
0
]
;
then
echo
"WARNING: This repository contained previously edited working set files."
fi
echo
" hg status -m | wc -l =
`
hg status
-m
|
wc
-l
`
"
fi
# Cleanup
rm
-f
-r
${
tmp
}
exit
0
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录