Blame Scripts/Bash/Functions/Svg/svg.sh

641be4
#!/bin/bash
641be4
#
641be4
# svg.sh -- This function provides very basic SVG manipulations to
641be4
# help maintain svg files inside the repository.
641be4
#
641be4
# Copyright (C) 2009-2010 Alain Reguera Delgado
641be4
# 
641be4
# This program is free software; you can redistribute it and/or modify
641be4
# it under the terms of the GNU General Public License as published by
641be4
# the Free Software Foundation; either version 2 of the License, or
641be4
# (at your option) any later version.
641be4
# 
641be4
# This program is distributed in the hope that it will be useful, but
641be4
# WITHOUT ANY WARRANTY; without even the implied warranty of
641be4
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
641be4
# General Public License for more details.
641be4
#
641be4
# You should have received a copy of the GNU General Public License
641be4
# along with this program; if not, write to the Free Software
641be4
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
641be4
# USA.
641be4
# 
641be4
# ----------------------------------------------------------------------
641be4
# $Id$
641be4
# ----------------------------------------------------------------------
641be4
    
641be4
function svg {
641be4
641be4
    local FILES=''
641be4
641be4
    # Define list of scalable vector graphic files to process using
641be4
    # option value as reference.
641be4
    if [[ -d $OPTIONVAL ]];then
641be4
        FILES=$(find $OPTIONVAL -regextype posix-egrep -type f -regex '.*/*.svg$')
641be4
    elif [[ -f $OPTIONVAL ]];then
641be4
        FILES=$OPTIONVAL
641be4
    fi
641be4
    
641be4
    # Define command line interface for svg-based actions.
641be4
    svg_getActions 
641be4
641be4
}