From 128302e8eb77b1ab810c4585a0805ab7a565e668 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 6 Jul 2022 20:51:10 -0500 Subject: Generate copyright from provided author, email, year --- licensor | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/licensor b/licensor index cdeb5ce..9f9a808 100755 --- a/licensor +++ b/licensor @@ -55,7 +55,6 @@ main() { __year="$(date +%Y)" __author="$(guess_author)" __email="$(guess_email)" - __copyright="Copyright (C) $__year $__author <$__email>" while getopts hlLs:fzZpPqy:a:e:o:w:c: opt; do case "$opt" in @@ -93,6 +92,10 @@ main() { __output=/dev/stdout fi + if [ -z "$__copyright" ]; then + __copyright="Copyright (C) $__year $__author <$__email>" + fi + license_file="$(get_license "$__license")" || exit $? license_convert <"$LICENSOR_CACHE/$license_file.template.txt" \ "$__copyright" "$_optional" "$_fold" "$__width" >"$__output" -- cgit 1.4.1-21-gabe81