From 17dbe562ad719c02e80bd790174034e0daa400dd Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Mar 25 2011 01:17:44 +0000 Subject: Update cli_getCopyrightInfo.sh: - Stop using `--copyright-holder' option as default action when no argument is passed to cli_getCopyrightInfo function. Instead, add `--copyright' option and start using it. The `--copyright' option combines both the `--copyright-holder' and the `--copyright-year' options to build the full copyright notice as `Copyright © YEAR HOLDER'. --- diff --git a/Scripts/Functions/cli_getCopyrightInfo.sh b/Scripts/Functions/cli_getCopyrightInfo.sh index b376890..5c5a5db 100755 --- a/Scripts/Functions/cli_getCopyrightInfo.sh +++ b/Scripts/Functions/cli_getCopyrightInfo.sh @@ -59,12 +59,18 @@ function cli_getCopyrightInfo { date +%Y ;; - '--copyright-holder' | * ) + '--copyright-holder' ) # Output default copyright holder. echo "The CentOS Project" ;; + '--copyright' | * ) + local YEAR=$(cli_getCopyrightInfo '--copyright-year') + local HOLDER=$(cli_getCopyrightInfo '--copyright-holder') + echo "Copyright © $YEAR $HOLDER" + ;; + esac }