Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update maintainer scripts #3373

Merged
merged 3 commits into from
Dec 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,12 @@ Nils Binz
Nishchay Suri
O.V. Rud
Owen A. Hickey-Moriarty
Pascal Hebbeker
Patrick Diggins
Patrick Kreissl
Pedro Ojeda
Pedro Sanchez
Peter Kosovan
Peter Košovan
Pierre de Buyl
Robert Kaufmann
Robin Bardakcioglu
Expand All @@ -117,6 +118,7 @@ Steffen Hirschmann
Stephan Gekle
Thomas Spura
Tilak Waelde
Tim Meiler
Timo Schürg
Tobias Rau
Tobias Richter
Expand Down
2 changes: 2 additions & 0 deletions maintainer/add_missing_headers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ for f in ${py_files}; do
(sed -e 's/^/# /' maintainer/header_template.txt | sed 's/ $//'; cat "${f}") > "${tmp}"
fi
cp "${tmp}" "${f}"
echo "${f}"
done
# process c++/cuda/doxygen files
for f in ${cpp_files}; do
Expand All @@ -48,5 +49,6 @@ for f in ${cpp_files}; do
echo ' */'
cat "${f}") > "${tmp}"
cp "${tmp}" "${f}"
echo "${f}"
done
rm "${tmp}"
10 changes: 4 additions & 6 deletions maintainer/find_potentially_missing_authors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@

cd "$(git rev-parse --show-toplevel)"

git log |
grep -i ^author |
cut -f2- -d\ |
sed -e 's/ <.*//' |
sort -u |
git shortlog -s |
sed -r 's/^ *[0-9]+\t//' |
sort |
while read author; do
grep -i "${author}" AUTHORS >/dev/null || echo "Missing: ${author}"
grep -iF "${author}" AUTHORS >/dev/null || echo "Missing: ${author}"
done
8 changes: 5 additions & 3 deletions maintainer/update_header.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# 1. Find files that do have copyright disclaimers
# 1.1. Find files that do not have the current year in the disclaimer
# 1.1.1. Find files that have "The ESPResSo project" in the line
# 1.1.1.1. Append 2012 to the years
# 1.1.1.1. Append <current_year> to the years
# 1.1.2. Insert new line "Copyright (C) <current_year> The ESPResSo
# project" before the copyright disclaimer
#
Expand Down Expand Up @@ -64,8 +64,10 @@ disclaimer="Copyright (C) ${current_year} The ESPResSo project"
echo " \"${disclaimer}\""
tmpfile=$(mktemp)
for file in ${noproject_files}; do
echo " ${file}"
perl -pe "if (!\$done) { s/^(.*)Copyright/\1${disclaimer}\n\1Copyright/ and \$done=1; }" "${file}" > "${tmpfile}"
cat "${tmpfile}" > "${file}"
if ! cmp --quiet "${file}" "${tmpfile}"; then
echo "${file}"
cp "${tmpfile}" "${file}"
fi
done
rm "${tmpfile}"