@subheading Goals
This section describes the @code{prepare} functionality of
@command{centos-art.sh} script and the preliminar steps you need to
follow in order to get your workstation ready for using the CentOS
Artwork Repository.
@subheading Description
The @code{prepare} functionality of @command{centos-art.sh} script
verifies all the information required by the working copy of CentOS
Artwork Repository (e.g., packages of software, symbolic links, etc.)
does exist in your workstation.
The @code{prepare} functionality of @command{centos-art.sh} script is
part of the CentOS Artwork Repository. So, in order to execute the
@code{prepare} functionality of @command{centos-art.sh} script you
need to have access to a working copy of CentOS Artwork Repository,
first. Working copies of CentOS Artwork Repository are downloaded
from the source repository and made available to you by mean of
workstations. A workstation is a computer that you install and
configure (prepare) to do something. In this case, you pick a computer
and prepare it for working on the CentOS Artwork Repository.
@subsubheading Installing the workstation
Installing the workstation is the first step you need to perform for
using the CentOS Artwork Repository. In this step you make your
computer functional through an operating system. In this case, The
Community Enterprise Operating System; which is also know as The
CentOS Distribution or just CentOS, for short.
To install The CentOS Distribution you need to have the installation
media somehow (e.g., CDs, DVDs, Pendrives, etc.). There are several
different ways to perform the installation process of CentOS
distribution, but generally, you put the installation media in your
media reader, boot the computer from it, and follow the installer
intructions. That simple.
If you don't have the installation media of CentOS distribution, you
need to download the ISO files related to the media you plan to use
(e.g., CD or DVD) and then create the installation media by yourself.
The CentOS Distribution ISO files can be downloaded from
@url{http://mirrors.centos.org/} and, if you chosen CD or DVD as your
prefered installation medium, you can burn the ISO files using the
@command{K3B} application to create the installation media you'll use.
Of course, in order to download the ISO files and create the
installation media, you need to have an already installed CentOS
workstation where you can realized all the work.
@subsubheading Configuring the workstation
Once you've installed the workstation and it is up and running, login
as @samp{root} user, create a username (e.g., @samp{centos}) and set a
password for it. This is the username you must use for everyday work
inside your working copy of the CentOS Artwork Repository.
@quotation
@strong{Caution} Do not use ever the @samp{root} username for your
everyday work inside the working copy of CentOS Artwork Repository.
It is dangerous and might provoke unreversable damages on your
workstation.
@end quotation
Once you've created the username for everyday work, there are some
environment variables that you can customize to fit your personal
needs (e.g., the text editor you'll use, the language the automation
scripts will use to print and translate output messages, the time
correction for your location, etc.). To customize these variables you
need to edit your profile file (i.e., @file{~/.bash_profile}) and set
the redefinition there. Notice that you may need to logout and then
do login again in order for the new variable values to take effect.
@table @strong
@item Default text editor:
The default text editor information is contrlled by the @env{EDITOR}
environment variable. The @file{centos-art.sh} script uses the default
text editor to edit subversion pre-commit messages, translation files,
documentation files, script files, and similar text-based files.
If @env{EDITOR} environment variable is not set, @file{centos-art.sh}
script uses @file{/usr/bin/vim} as default text editor. Otherwise, the
following values are recognized by @file{centos-art.sh} script:
@itemize
@item @file{/usr/bin/vim}
@item @file{/usr/bin/emacs}
@item @file{/usr/bin/nano}
@end itemize
If no one of these values is set in the @env{EDITOR} environment
variable, the @file{centos-art.sh} script uses @file{/usr/bin/vim}
text editor, the one installed by default in The CentOS Distribution.
@item Default locale information:
The default locale information is controlled by the @env{LANG}
environment variable. This variable is initially set in the
configuration process of CentOS distribution installer, specifically
in the @samp{Language} step; or once installed using the
@command{system-config-language} tool.
The @command{centos-art.sh} script uses the @env{LANG} environment
variable to determine what language to use for printing output
messages. Moreover, the @code{locale} functionality uses the
@env{LANG} to determine what translation messages to udpate or edit.
@item Default time zone representation:
The time zone representation is a time correction applied to the
system time (stored in the BIOS clock) based on your country location.
This correction is specially useful to distributed computers around
the world that work together and need to be syncronized in time to
know when things happened.
The CentOS Artwork Repository is made of one server and several
workstations spread around the world. In order for all these
workstations to know when changes in the server took place, it is
required that all the workstations set their system clocks to use the
same time information (i.e., @acronym{UTC,Coordinated Universal Time})
and set the time correction for their countries in the operating
system. Otherwise, it'd be hard to know when something exactly
happened.
Generally, setting the time information is a straight-forward task and
configuration tools provided by The CentOS Distribution do cover time
correction for most of the countries around the world. However, if
you need a time precision not provided by any of the date and time
configuration tools provided by The CentOS Distribution then, you need
to use the @env{TZ} environment variable to correct the time
information by yourself. The format of @env{TZ} environment variable
is described in @file{tzset(3)} manual page.
@end table
@subsubheading Downloading the working copy
Once you've configured the workstation, it is time to download the
working copy of CentOS Artwork Repository.
To download the working copy of CentOS Artwork Repository you need to
login as your everyday work username (e.g., @samp{centos}) and use the
Subversion client to bring all the files you need to work with down
from the source location of CentOS Artwork Repository
(@url{https://projects.centos.org/svn/artwork/}) to your workstation,
just as the following command describes:
@verbatim
svn co https://projects.centos.org/svn/artwork ~/
@end verbatim
This command will create the working copy of CentOS Artwork Repository
in your workstation, specifically in the @file{/home/centos/artwork}
directory. Note that you only need to execute this command once.
After that, to keep your working copy up to date, you use the
Subversion @command{update} command instead.
@quotation
@strong{Tip} In the condition that you don't have Subversion client
installed in the workstation, then you can install it using the
command:
@verbatim
sudo yum install subversion
@end verbatim
@end quotation
@subsubheading Configuring the working copy
Once you have a working copy of CentOS Artwork Repository in your
workstation, you can go and run the @code{prepare} functionality of
@command{centos-art.sh} script to realize the remaining configuration
stuff.
Assuming this is the very first time you run the
@command{centos-art.sh} script, you'll find that there is no
@command{centos-art} command-line interface for it in your
workstation. This is correct. In order to have the
@command{centos-art} command-line in your workstation, you need to run
the @command{centos-art.sh} script using its absolute path:
@verbatim
~/artwork/trunk/Scripts/centos-art.sh prepare [OPTIONS]
@end verbatim
Assuming you've already run the @code{prepare} functionality before,
there is no need for you to use the absolute path again. Instead, you
can use the @command{centos-art} command-line interface directly, as
the following example describes:
@verbatim
centos-art.sh prepare [OPTIONS]
@end verbatim
Notice that you can execute the @code{prepare} functionality more than
once. This is specially useful to keep the link information
syncronized. For example, considering you've added new brushes to or
removed old brushes from your working copy of CentOS Artwork
Repository, the link information related to those files need to be
updated in the @file{~/.gimp-2.2/brushes} directory too, in a way that
reflect the addition/deletion change that took place in your working
copy. The same is true for fonts, patterns and palettes components.
@subheading Usage
@subsubheading Synopsis
@command{centos-art prepare [OPTIONS]}
@subsubheading Options
@table @option
@item --packages
Verify existence of software packages and install them if they aren't
installed yet.
This option provides the software required to manipulate files inside
the repository (e.g., image files, documentation files, translation
files, script files, etc.). Most of the software packages required by
the CentOS Artwork Repository are available on The CentOS Distribution
and can be installed using The CentOS Distribution installation media.
The only exception is the @file{inkscape}, the package you use to
manipulate @acronym{SVG,Scalable Vector Graphics} files. The
@file{inkscape} package isn't inside The CentOS Distribution or any of
The CentOS Project repositories neither, so you need to install it from
a third party repositories like @samp{RPMForge} or @samp{EPEL}.
@item --link
Update connection between working copy and workstation through
symbolic links.
This option creates the @command{centos-art} command-line interface of
@command{centos-art.sh} script through a symbolic link. There is no
need for you to type the full path to @command{centos-art.sh} script
each time you need to execute it. Instead, you use the
@command{centos-art} command which is much shorter and faster to type.
This option connects design compenents like fonts, brushes, patterns
and palettes inside your working copy of CentOS Artwork Repository
with programs like @acronym{GIMP, GNU Image Manipulation Program} and
Inkscape outside it. This way, all your modifications on these
components will take place inside the repository and will be shared to
all other working copies the next time you commit the changes up to
source repository.
This option standardizes width, tabulation, indentation, and line
numbering for text editors in your workstation. The configuration
file where these definitions are set, is versioned inside your working
copy and linked from the appropriate place in the workstation to make
it valid to your default text editor.
@item --environment
Print the name and value of some of the environment variables used by
@command{centos-art.sh} scripts.
@item --quiet
Supress all output messages, including confirmation question. Use this
option with care.
@item --answer-yes
Assume @samp{yes} to all confirmation questions.
@end table
@subheading See also
@itemize
@item @ref{Directories trunk Scripts Functions}
@item @ref{Directories trunk Scripts}
@item @ref{Directories trunk}
@item
@url{http://wiki.centos.org/AdditionalResources/Repositories/,The
CentOS Repositories}, to know how to configure third party
repositories inside The CentOS Distribution.
@end itemize