diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-11-14 08:37:05 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-11-14 08:37:05 +0200 |
commit | d1375921a7c3b70c0692783a46539ecfbd313194 (patch) | |
tree | 9afe4c1f2c885600ff2ce5b9e1c176b3e133aeac | |
parent | 69115d2d8a35dfb22b1858b9b956ced2048b78e3 (diff) |
Recognize LICENSE.{txt,md}, COPYING as license files
-rw-r--r-- | bdep/new.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/bdep/new.cxx b/bdep/new.cxx index 4dff04f..b212816 100644 --- a/bdep/new.cxx +++ b/bdep/new.cxx @@ -1322,9 +1322,20 @@ cmd_new (cmd_new_options&& o, cli::group_scanner& args) readme_f = move (f); } - // LICENSE or UNLICENSE + // LICENSE + // LICENSE.txt + // LICENSE.md + // COPYING + // UNLICENSE // - if (exists ((f = out / "LICENSE")) || exists ((f = out / "UNLICENSE"))) + // Note that LICENSE.md is often just a plain text file without any + // markup so we should be able to detect the license. + // + if (exists ((f = out / "LICENSE")) || + exists ((f = out / "LICENSE.txt")) || + exists ((f = out / "LICENSE.md")) || + exists ((f = out / "COPYING")) || + exists ((f = out / "UNLICENSE"))) { license_e = extract_license (f); |