Goals
-----

This section describes the prepare functionality of centos-art.sh script and the preliminar steps you need to follow in order to get your workstation ready for using a working copy of CentOS Artwork Repository.

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

The prepare functionality of centos-art.sh script provides the standard way of configuring the workstation you plan to use for storing the working copy of CentOS Artwork Repository.

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 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. Moreover, the locale functionality uses the LANG to determine what translation messages to udpate or edit.

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., 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 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.

Usage
-----

Synopsis
........

centos-art prepare [OPTIONS]

Options
.......

--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

     Install/update connection between working copy and workstation through symbolic links.

     This option creates the centos-art command-line interface of centos-art.sh script through a symbolic link.  There is no need for you to type the full path to centos-art.sh script each time you need to execute it.  Instead, you use the 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 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.

--environment

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

--quiet

     Supress all output messages, including confirmation question. Use this option with care.

--answer-yes

     Assume yes to all confirmation questions.

See also
--------

  * Directories trunk Scripts Functions

  * Directories trunk Scripts

  * Directories trunk