Blame Manual/repository-latex/Identity/Themes/Distro/Backgrounds/build.sh

183ae8
#!/bin/bash
183ae8
#
183ae8
# Build Background tables for LaTeX documents.
183ae8
#
183ae8
# Copyright (C) 2009 Alain Reguera Delgado
183ae8
#
183ae8
# This program is free software; you can redistribute it and/or modify
183ae8
# it under the terms of the GNU General Public License as published by
183ae8
# the Free Software Foundation; either version 2 of the License, or
183ae8
# (at your option) any later version.
183ae8
#
183ae8
# This program is distributed in the hope that it will be useful, but
183ae8
# WITHOUT ANY WARRANTY; without even the implied warranty of
183ae8
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
183ae8
# General Public License for more details.
183ae8
#
183ae8
# You should have received a copy of the GNU General Public License
183ae8
# along with this program; if not, write to the Free Software
183ae8
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
183ae8
# USA
183ae8
#
183ae8
#--------------------------------------
183ae8
# $Id:$
183ae8
#--------------------------------------
183ae8
183ae8
# Load dependencies.
183ae8
. ~/artwork/trunk/Scripts/Bash/loadFunctions.sh
183ae8
183ae8
# Define the names of your tables.
183ae8
FILES="table-theme.tex
183ae8
       table-config.tex"
183ae8
183ae8
for FILE in $FILES;do
183ae8
183ae8
   # Let know which table we are creating.
183ae8
   echo $FILE
183ae8
183ae8
   # Define what to do with each table you define on FILES.
183ae8
   case $FILE in
183ae8
183ae8
      table-theme.tex )
183ae8
      # Create table holding theme files.
183ae8
      ROWS="$(getFiles '/usr/share/backgrounds' 'default.*\.(jpg|png)')"
183ae8
      ;;
183ae8
183ae8
      table-config.tex )
183ae8
      # Create table holding configuration files.
183ae8
      ROWS="$(getFiles '/etc/gdm' '\.conf$' '/default\.(jpg|png)')
183ae8
            $(getFiles '/etc/gconf' '\.(schemas|xml)$' '/default.*\.(jpg|png)')
183ae8
            $(getFiles '/usr/share/config' 'rc$' 'default.*\.(jpg|png)')"
183ae8
      ;;
183ae8
183ae8
   esac
183ae8
183ae8
   # Create table.
183ae8
   createTable "$ROWS" "" "" > $FILE
183ae8
183ae8
done