RFR: 8279315: Add Git support to update_copyright_year.sh script

Erik Joelsson erikj at openjdk.java.net
Thu Jan 13 14:10:28 UTC 2022


On Tue, 11 Jan 2022 13:10:38 GMT, Dmitry Kulikov <duke at openjdk.java.net> wrote:

> Modified the `make/scripts/update_copyright_year.sh` script to support Git as well as Mercurial, as per [JDK-8279315](https://bugs.openjdk.java.net/browse/JDK-8279315). Also added the ability to specify company name as a command line argument instead of being hard-coded into the script.

Looks good. 

Did you consider automatically inferring the VCS by looking for `${this_script_dir}/../../{.git,.hg}`? To resolve `this_script_dir`, you can use the same snippet we have in e.g. top level configure:


# Get an absolute path to this script, since that determines the top-level directory.
this_script_dir=`dirname $0`
this_script_dir=`cd $this_script_dir > /dev/null && pwd`

-------------

Marked as reviewed by erikj (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/7027



More information about the build-dev mailing list