diff options
author | Case Duckworth | 2022-07-06 20:51:10 -0500 |
---|---|---|
committer | Case Duckworth | 2022-07-06 20:51:10 -0500 |
commit | 128302e8eb77b1ab810c4585a0805ab7a565e668 (patch) | |
tree | ea73721a8066ba8764bd353ca6acaedbfaee2432 | |
parent | Fix bug (diff) | |
download | licensor-128302e8eb77b1ab810c4585a0805ab7a565e668.tar.gz licensor-128302e8eb77b1ab810c4585a0805ab7a565e668.zip |
Generate copyright from provided author, email, year
-rwxr-xr-x | licensor | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/licensor b/licensor index cdeb5ce..9f9a808 100755 --- a/licensor +++ b/licensor | |||
@@ -55,7 +55,6 @@ main() { | |||
55 | __year="$(date +%Y)" | 55 | __year="$(date +%Y)" |
56 | __author="$(guess_author)" | 56 | __author="$(guess_author)" |
57 | __email="$(guess_email)" | 57 | __email="$(guess_email)" |
58 | __copyright="Copyright (C) $__year $__author <$__email>" | ||
59 | 58 | ||
60 | while getopts hlLs:fzZpPqy:a:e:o:w:c: opt; do | 59 | while getopts hlLs:fzZpPqy:a:e:o:w:c: opt; do |
61 | case "$opt" in | 60 | case "$opt" in |
@@ -93,6 +92,10 @@ main() { | |||
93 | __output=/dev/stdout | 92 | __output=/dev/stdout |
94 | fi | 93 | fi |
95 | 94 | ||
95 | if [ -z "$__copyright" ]; then | ||
96 | __copyright="Copyright (C) $__year $__author <$__email>" | ||
97 | fi | ||
98 | |||
96 | license_file="$(get_license "$__license")" || exit $? | 99 | license_file="$(get_license "$__license")" || exit $? |
97 | license_convert <"$LICENSOR_CACHE/$license_file.template.txt" \ | 100 | license_convert <"$LICENSOR_CACHE/$license_file.template.txt" \ |
98 | "$__copyright" "$_optional" "$_fold" "$__width" >"$__output" | 101 | "$__copyright" "$_optional" "$_fold" "$__width" >"$__output" |