Blame Scripts/Bash/Functions/Html/html.sh

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