diff --git a/Scripts/Bash/Functions/Prepare/prepare_forUsingCli.sh b/Scripts/Bash/Functions/Prepare/prepare_forUsingCli.sh deleted file mode 100755 index f27f4c0..0000000 --- a/Scripts/Bash/Functions/Prepare/prepare_forUsingCli.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash -# -# prepare_forUsingCli.sh -- This function -# -# Copyright (C) 2009-2010 Alain Reguera Delgado -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# ---------------------------------------------------------------------- -# $Id$ -# ---------------------------------------------------------------------- - -function prepare_forUsingCli { - - # Define variables as local to avoid conflicts outside. - local -a REPODIRS - local -a REPOFILES - local -a REPOLINKS - - # Define directories required by the centos-art.sh script command - # line interface. - REPODIRS[0]=/home/centos - REPODIRS[1]=/home/centos/bin - REPODIRS[2]=/home/centos/artwork/trunk/Scripts/Bash - - # Define files required by the centos-art.sh script command line - # interface. - REPOFILES=${REPODIRS[2]}/centos-art.sh - - # Define symbolic links required by the centos-art.sh script - # command line interface. - REPOLINKS=${REPODIRS[1]}/centos-art - - # Check defined directories, files, and symbolic links. - cli_checkFiles ${REPOFILES[@]} 'f' - cli_checkFiles ${REPOLINKS[@]} 'h' - -} diff --git a/Scripts/Bash/Functions/Prepare/prepare_forUsingFonts.sh b/Scripts/Bash/Functions/Prepare/prepare_forUsingFonts.sh deleted file mode 100644 index 7fef458..0000000 --- a/Scripts/Bash/Functions/Prepare/prepare_forUsingFonts.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# -# prepare_forUsingFonts.sh -- This function checks user's fonts -# directory. In order for some artworks to be rendered correctly, -# denmark font needs to be available. By default, denmark font doesn't -# come with CentOS distribution so create a symbolic link (from the -# one we have inside repository) to make it available if it isn't yet. -# -# Copyright (C) 2009-2010 Alain Reguera Delgado -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# ---------------------------------------------------------------------- -# $Id$ -# ---------------------------------------------------------------------- - -function prepare_forUsingFonts { - - # Define variables as local to avoid conflicts outside. - local -a REPODIRS - local -a REPOFILES - local -a REPOLINKS - - # Define font related directories. - REPODIRS[0]=/home/centos/.fonts - REPODIRS[1]=/home/centos/artwork/trunk/Identity/Fonts/Ttf - - # Define font related files. - REPOFILES=${REPODIRS[0]}/denmark.ttf - - # Define font related symbolic links. - REPOLINKS=${REPODIRS[1]}/denmark.ttf - - # Check defined directories, files, and symbolic links. - cli_checkFiles "${REPODIRS[@]}" - cli_checkFiles "${REPOFILES[@]}" - cli_checkFiles "${REPOLINKS[@]}" - -} diff --git a/Scripts/Bash/Functions/Prepare/prepare_forUsingInkscape.sh b/Scripts/Bash/Functions/Prepare/prepare_forUsingInkscape.sh deleted file mode 100755 index 4ea3f5e..0000000 --- a/Scripts/Bash/Functions/Prepare/prepare_forUsingInkscape.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -# -# prepare_forUsingInkscape.sh -- This function prepares user's -# ~/.inkscape configurations directory to use CentOS defaults (e.g., -# palettes, patterns, etc). -# -# Copyright (C) 2009-2010 Alain Reguera Delgado -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# ---------------------------------------------------------------------- -# $Id$ -# ---------------------------------------------------------------------- - -function prepare_forUsingInkscape { - - # Define variables as local to avoid conflicts outside. - local -a REPODIRS - local -a REPOFILES - local -a REPOLINKS - - # Define directories required by the centos-art.sh script command - # line interface. - REPODIRS[0]=/home/centos/.inkscape/palettes - REPODIRS[1]=/home/centos/artwork/trunk/Identity/Colors - - # Define files required by the centos-art.sh script command line - # interface. - REPOFILES=${REPODIRS[1]}/CentOS.gpl - - # Define symbolic links required by the centos-art.sh script - # command line interface. - REPOLINKS=${REPODIRS[0]}/CentOS.gpl - - # Check defined directories, files, and symbolic links. - cli_checkFiles "${REPODIRS[@]}" - cli_checkFiles "${REPOFILES[@]}" - cli_checkFiles "${REPOLINKS[@]}" - -} diff --git a/Scripts/Bash/Functions/Prepare/prepare_forUsingPathCli.sh b/Scripts/Bash/Functions/Prepare/prepare_forUsingPathCli.sh new file mode 100755 index 0000000..ee6ddf2 --- /dev/null +++ b/Scripts/Bash/Functions/Prepare/prepare_forUsingPathCli.sh @@ -0,0 +1,51 @@ +#!/bin/bash +# +# prepare_forUsingPathCli.sh -- This function +# +# Copyright (C) 2009-2010 Alain Reguera Delgado +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA. +# +# ---------------------------------------------------------------------- +# $Id$ +# ---------------------------------------------------------------------- + +function prepare_forUsingPathCli { + + # Define variables as local to avoid conflicts outside. + local -a REPODIRS + local -a REPOFILES + local -a REPOLINKS + + # Define directories required by the centos-art.sh script command + # line interface. + REPODIRS[0]=/home/centos + REPODIRS[1]=/home/centos/bin + REPODIRS[2]=/home/centos/artwork/trunk/Scripts/Bash + + # Define files required by the centos-art.sh script command line + # interface. + REPOFILES=${REPODIRS[2]}/centos-art.sh + + # Define symbolic links required by the centos-art.sh script + # command line interface. + REPOLINKS=${REPODIRS[1]}/centos-art + + # Check defined directories, files, and symbolic links. + cli_checkFiles ${REPOFILES[@]} 'f' + cli_checkFiles ${REPOLINKS[@]} 'h' + +} diff --git a/Scripts/Bash/Functions/Prepare/prepare_forUsingPathFonts.sh b/Scripts/Bash/Functions/Prepare/prepare_forUsingPathFonts.sh new file mode 100644 index 0000000..0220e65 --- /dev/null +++ b/Scripts/Bash/Functions/Prepare/prepare_forUsingPathFonts.sh @@ -0,0 +1,52 @@ +#!/bin/bash +# +# prepare_forUsingPathFonts.sh -- This function checks user's fonts +# directory. In order for some artworks to be rendered correctly, +# denmark font needs to be available. By default, denmark font doesn't +# come with CentOS distribution so create a symbolic link (from the +# one we have inside repository) to make it available if it isn't yet. +# +# Copyright (C) 2009-2010 Alain Reguera Delgado +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA. +# +# ---------------------------------------------------------------------- +# $Id$ +# ---------------------------------------------------------------------- + +function prepare_forUsingPathFonts { + + # Define variables as local to avoid conflicts outside. + local -a REPODIRS + local -a REPOFILES + local -a REPOLINKS + + # Define font related directories. + REPODIRS[0]=/home/centos/.fonts + REPODIRS[1]=/home/centos/artwork/trunk/Identity/Fonts/Ttf + + # Define font related files. + REPOFILES=${REPODIRS[0]}/denmark.ttf + + # Define font related symbolic links. + REPOLINKS=${REPODIRS[1]}/denmark.ttf + + # Check defined directories, files, and symbolic links. + cli_checkFiles "${REPODIRS[@]}" + cli_checkFiles "${REPOFILES[@]}" + cli_checkFiles "${REPOLINKS[@]}" + +} diff --git a/Scripts/Bash/Functions/Prepare/prepare_forUsingPathInkscape.sh b/Scripts/Bash/Functions/Prepare/prepare_forUsingPathInkscape.sh new file mode 100755 index 0000000..63417e9 --- /dev/null +++ b/Scripts/Bash/Functions/Prepare/prepare_forUsingPathInkscape.sh @@ -0,0 +1,53 @@ +#!/bin/bash +# +# prepare_forUsingPathInkscape.sh -- This function prepares user's +# ~/.inkscape configurations directory to use CentOS defaults (e.g., +# palettes, patterns, etc). +# +# Copyright (C) 2009-2010 Alain Reguera Delgado +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA. +# +# ---------------------------------------------------------------------- +# $Id$ +# ---------------------------------------------------------------------- + +function prepare_forUsingPathInkscape { + + # Define variables as local to avoid conflicts outside. + local -a REPODIRS + local -a REPOFILES + local -a REPOLINKS + + # Define directories required by the centos-art.sh script command + # line interface. + REPODIRS[0]=/home/centos/.inkscape/palettes + REPODIRS[1]=/home/centos/artwork/trunk/Identity/Colors + + # Define files required by the centos-art.sh script command line + # interface. + REPOFILES=${REPODIRS[1]}/CentOS.gpl + + # Define symbolic links required by the centos-art.sh script + # command line interface. + REPOLINKS=${REPODIRS[0]}/CentOS.gpl + + # Check defined directories, files, and symbolic links. + cli_checkFiles "${REPODIRS[@]}" + cli_checkFiles "${REPOFILES[@]}" + cli_checkFiles "${REPOLINKS[@]}" + +} diff --git a/Scripts/Bash/Functions/Prepare/prepare_forUsingPaths.sh b/Scripts/Bash/Functions/Prepare/prepare_forUsingPaths.sh index 961ecb6..ece08e1 100644 --- a/Scripts/Bash/Functions/Prepare/prepare_forUsingPaths.sh +++ b/Scripts/Bash/Functions/Prepare/prepare_forUsingPaths.sh @@ -27,11 +27,8 @@ function prepare_forUsingPaths { - # Output action message. - cli_printMessage "`gettext "Checking paths"`" - - prepare_forUsingCli - prepare_forUsingFonts - prepare_forUsingInkscape + prepare_forUsingPathCli + prepare_forUsingPathFonts + prepare_forUsingPathInkscape }