Update tcar directory structure and files.
- Previously, automation scripts were stored in tcar-scripts
directory. This update moves automation scripts from tcar-scripts to
Scripts directory.
- Previously, function top comments included the function's purpose, a
written by section, a copyright line and the license section, in
this order. This update removes the written by section and
rearranges the function's purpose, copyright line and license
section.
Now, the function purpose is out of the top comment and placed on
top of function definition. The top comment includes the script name
(not the function name) and a description of what it does, all in
one line. Later, it is the copyright line and the license section,
and my personal contact information both electronic and paper, in
this order. The distinctive comment block is surrounded by one line
made of 70 number characters (#).
The distinctive comment block is separated from non-distinctive
block explaining the function's purpose using a white line.
- Previously, environment variables definitions related to paths were
set inside the tcar.sh file. This made difficult to customize the
source files location required to execute automation scripts in its
pristine state without installing it using RPM (see bug #152). This
actualization moves the environment variables definitions from
tcar.sh file to tcar.conf file.
The tcar.sh script reads the tcar.conf file from /etc/tcar/tcar.conf
and ~/.tcar.conf locations. By default, only the first one is
installed in the system and provides the default values tcar.sh
script needs to work with The CentOS Artwork Repository installed
through RPM under /usr/share/tcar directory. However, if you are a
developer and want to make changes to tcar automation scripts and
also test them quickly, you must not use the source files installed
at /usr/share/tcar, which are installed as read-only files for
regular users. You must not use root user for such things either.
Instead, to make changes and quick tests over automation scripts,
download The CentOS Artwork Repository in its pristine state, store
it somewhere in your workstation where you have write access (e.g.,
your home directory), make changes and tests there and, when you
have something functional, copy the files you changed to the
appropriate development branch for further committing and pushing
them to the central repository. In order for all this to work, you
must copy the tcar.conf file to ~/.tcar.conf and change the path
values inside it to point to the writable location you have The
CentOS Artwork Repository pristine state.
- Previously, when the tcar.sh script was executed without any
argument or option, there was no default actions for it. This update
adds tcar_printUsage function and sets tcar.sh script to use it as
default action when no argument or option is provided to tcar
command-line.
- Previously, the 'tcar --help' was conceived to print the tcar manual
page. This is too much information to digest at first time.
Specially in situations when just a usage message would be enough.
This update changes tcar.sh file to make the 'tcar --help' command
to print tcar usage, instead of its manual page.
- Previously, TEXTDOMAIN environment variable was set to
TCAR_SCRIPT_PACKAGE value. The TCAR_SCRIPT_PACKAGE variable is no
longer defined and make TEXTDOMAIN environment variable to have an
empty value. This update changes TEXTDOMAIN value from
TCAR_SCRIPT_PACKAGE to TCAR_SCRIPT_NAME.
- Previously, the release year was set using rpm. This made tcar
script to print no release year in situations where the automation
scripts were executed directly from its pristine state without being
installed through rpm first. This update changes
tcar_printCopyrightInfo function to use 2014 as the last release
year.
- Optimize tcar_printVersion function. There is not need to define
copyright year and copyright holder here. Use the
tcar_printCopyrightInfo function without argument to print the
copyright sentence using the default year and holder.