Update README and README.md depending on which exists
authorTomas Mraz <tomas@openssl.org>
Mon, 11 Sep 2023 14:06:41 +0000 (16:06 +0200)
committerTomas Mraz <tomas@openssl.org>
Thu, 18 Jan 2024 09:52:33 +0000 (10:52 +0100)
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/tools/pull/166)

release-tools/do-copyright-year

index dd79df5477db4123459b74ca446c120d45701f59..4aa0407c4f70299a1f96bc11f4f8f37e6b6e361f 100755 (executable)
@@ -33,9 +33,11 @@ collect_files() {
     git diff-tree -r --name-status `git rev-list -1 --before=$NYD HEAD`..HEAD | \
     grep -v '^ *D'
 
-    # Always update the end year in README.md. It might be listed twice,
-    # but this is hardly a problem, just slightly suboptimal.
-    echo 'X       README.md'
+    # Always update the end year in README.md and/or README.
+    # It might be listed twice, but this is hardly a problem,
+    # just slightly suboptimal.
+    [[ -f README.md ]] && echo 'X       README.md'
+    [[ -f README ]]    && echo 'X       README'
 }
 
 process_files() {