Blame Scripts/Bash/Functions/Shell/shell.sh

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