Name
----

The prepare functionality is part of the centos-art.sh script and standardizes configuration of preliminar steps you need to follow in order to get your workstation ready for using a working copy of CentOS Artwork Repository.

Synopsis
--------

centos-art prepare [OPTIONS]

There is no need to specify path/to/dir information in this functionality. Most actions are performed through options.

The prepare functionality of centos-art.sh script accepts the following options:

--quiet

     Supress all output messages except error messages.  When this option is passed, all confirmation requests are supressed as well and a possitive answer is assumed for them, just as if the --answer-yes option had been provided.

--answer-yes

     Assume yes to all confirmation requests.

--packages

     Install/update software packages required by the working copy of CentOS Artwork Repository.

     The process of software installation takes place through sudo yum and the repository configuration currently set in your workstation.

     Most of the software packages required by the working copy of CentOS Artwork Repository are available on The CentOS Distribution and can be installed using The CentOS Distribution installation media.  The only exception is Inkscape, the program used to manipulate SVG (Scalable Vector Graphics) files in the working copy.

     The 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 repository like RPMForge or EPEL. See page The CentOS Repositories (http://wiki.centos.org/AdditionalResources/Repositories/), to know how to configure third party repositories in The CentOS Distribution.

--link

     This option uses symbolic links to install/update the connection between components inside the working copy and components outside the working copy. Among the components that need to be connected figure out the command-line internface of centos-art.sh script; fonts, brushes, palettes and patterns used by programs like GIMP and Inkscape; and configuration files of text editors.

     The main purpose of such connection is to adapt the working copy to the CentOS Distribution filesystem layout (e.g., ~/bin directory is for storing personal programs, ~/gimp-2.2/brushes is for storing GIMP brushes for personal use, etc.) and, at the same time, to provide a way of sharing changes made to connected components to other workstations (e.g., if I update a GIMP brush in my workstation, you'll receive the change the next you update your working copy and then will be immediatly available for you to use in GIMP).

--environment

     Print the name and value of some of the environment variables used by centos-art.sh scripts.

Description
-----------

The prepare functionality of centos-art.sh script is part of the CentOS Artwork Repository. So, in order to execute the prepare functionality of 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 up a computer and prepare it for working on the CentOS Artwork Repository.

Installing the workstation
..........................

Installing the workstation is the first step you need to do. 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 http://mirrors.centos.org/ and, if you chosen CD or DVD as your prefered installation medium, you can burn the ISO files using the K3B application so as 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.

Configuring the workstation
...........................

Once you've installed the workstation and it is up and running, login as root user, create a username (e.g., 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.

     Caution Do not use the 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.

Once you've created the username for your everyday work, there are some environment variables that you can customize to fit your personal needs (e.g., default text editor, default locale information, default time zone representation, etc.).  To customize these variables you need to edit your profile file (i.e., ~/.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.

Default text editor:

     The default text editor information is contrlled by the EDITOR environment variable. The 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 EDITOR environment variable is not set, centos-art.sh script uses /usr/bin/vim as default text editor. Otherwise, the following values are recognized by centos-art.sh script:

       * /usr/bin/vim

       * /usr/bin/emacs

       * /usr/bin/nano

     If no one of these values is set in the EDITOR environment variable, the centos-art.sh script uses /usr/bin/vim text editor, the one installed by default in The CentOS Distribution.

Default locale information:

     The default locale information is controlled by the LANG environment variable. This variable is initially set in the configuration process of CentOS distribution installer, specifically in the Language step; or once installed using the system-config-language tool.

     The centos-art.sh script uses the LANG environment variable to determine what language to use for printing output messages. Another use of LANG variable inside centos-art.sh script is to determine what translation file to update or edit when input files are localized.

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 they all set their system clocks to use the same time information (i.e., UTC (Coordinated Universal Time)) and set the time correction for their specific countries in the operating system.  Otherwise, it would be difficult 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 TZ environment variable to correct the time information by yourself.  The format of TZ environment variable is described in tzset(3) manual page.

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., 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 (https://projects.centos.org/svn/artwork/) to your workstation, just as the following command describes:

svn co https://projects.centos.org/svn/artwork ~/

This command will create the working copy of CentOS Artwork Repository in your workstation, specifically in the /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 update command instead.

     Tip In the condition that you don't have Subversion client installed in the workstation, then you can install it using the command:

     sudo yum install subversion

Configuring the working copy
............................

Once you have a working copy of CentOS Artwork Repository in your workstation, you can go and run the prepare functionality of centos-art.sh script to realize the remaining configuration stuff.

Assuming this is the very first time you run the centos-art.sh script, you'll find that there is no centos-art command-line interface for it in your workstation.  This is correct. In order to have the centos-art command-line in your workstation, you need to run the centos-art.sh script using its absolute path:

~/artwork/trunk/Scripts/centos-art.sh prepare [OPTIONS]

Assuming you've already run the prepare functionality before, there is no need for you to use the absolute path again. Instead, you can use the centos-art command-line interface directly, as the following example describes:

centos-art.sh prepare [OPTIONS]

Notice that you can execute the 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 ~/.gimp-2.2/brushes directory too, in a way the addition/deletion change that took place in your working copy can be reflected there, as well.  The same is true for other similar components like fonts, patterns and palettes components.

Examples
--------

centos-art prepare --packages --link
     Preapare both links and packages required to use the working copy of CentOS Artwork Repository in the workstation. If required packages are already installed this command looks for updates instead.

centos-art prepare --link --quiet
     Update connection between the workstation and the working copy of CentOS Artwork Repository, using no output.

Author
------

Written by Alain Reguera Delgado.

Reporting bugs
--------------

Report bugs to centos-artwork@centos.org mailing list.

Copyright
---------

Copyright ©  2009, 2010, 2011 The CentOS Project.

This is free software.  You may redistribute copies of it under the terms of the GNU General Public License (see GNU General Public License).  There is NO WARRANTY, to the extent permitted by law.

See also
--------

  * Directories trunk Scripts Functions

  * Directories trunk Scripts

  * Directories trunk