From 175be887e60fb5e3906819f5eea2cce8a3a7d9bc Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Dec 13 2013 21:56:42 +0000 Subject: Update last year information on tcar_printCopyrightInfo function. - Previously, when the --version option was executed, tcar printed the current year in the copyright sentence. This is confusing since the script might release in previous years and having a recent year information printed may give the idea of recent software. In order to prevent this kind of confusion, this update changes tcar_printCopyrightInfo function to retrieve the last year information from the build time of tcar package. The build time of the rpm package is much more accurate than using the current year information dynamically. --- diff --git a/tcar-scripts/tcar_printCopyrightInfo.sh b/tcar-scripts/tcar_printCopyrightInfo.sh index 6be34a9..2779fd8 100755 --- a/tcar-scripts/tcar_printCopyrightInfo.sh +++ b/tcar-scripts/tcar_printCopyrightInfo.sh @@ -64,11 +64,10 @@ function tcar_printCopyrightInfo { --year|--last-year) - # The last year when The CentOS Project stopped working in - # its Corporate Visual Identity through the CentOS Artwork - # Repository. That is something that I hope never happens, - # so assume the current year as last working year. - date +%Y + # The software release year. This information should never + # be the current year. Instead, to make this information + # maintainable, relay on tcar package build-time. + rpm -q --qf "%{BUILDTIME:date}" tcar | gawk '{ print $4 }' ;; --years-range )