Blame Automation/Modules/Hello/hello.sh

Alain Reguera Delgado 98c81b
#!/bin/bash
Alain Reguera Delgado 98c81b
######################################################################
Alain Reguera Delgado 98c81b
#
Alain Reguera Delgado 98c81b
#   hello.sh -- Print greetings and exit successfully.
Alain Reguera Delgado 98c81b
#
Alain Reguera Delgado 98c81b
#   Written by:
Alain Reguera Delgado 98c81b
#   * Alain Reguera Delgado <al@centos.org.cu>, 2013
Alain Reguera Delgado 98c81b
#
Alain Reguera Delgado 98c81b
# Copyright (C) 2009-2013 The CentOS Artwork SIG
Alain Reguera Delgado 98c81b
#
Alain Reguera Delgado 98c81b
# This program is free software; you can redistribute it and/or modify
Alain Reguera Delgado 98c81b
# it under the terms of the GNU General Public License as published by
Alain Reguera Delgado 98c81b
# the Free Software Foundation; either version 2 of the License, or (at
Alain Reguera Delgado 98c81b
# your option) any later version.
Alain Reguera Delgado 98c81b
#
Alain Reguera Delgado 98c81b
# This program is distributed in the hope that it will be useful, but
Alain Reguera Delgado 98c81b
# WITHOUT ANY WARRANTY; without even the implied warranty of
Alain Reguera Delgado 98c81b
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Alain Reguera Delgado 98c81b
# General Public License for more details.
Alain Reguera Delgado 98c81b
#
Alain Reguera Delgado 98c81b
# You should have received a copy of the GNU General Public License
Alain Reguera Delgado 98c81b
# along with this program; if not, write to the Free Software
Alain Reguera Delgado 98c81b
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Alain Reguera Delgado 98c81b
#
Alain Reguera Delgado 98c81b
######################################################################
Alain Reguera Delgado 98c81b
Alain Reguera Delgado 98c81b
function hello {
Alain Reguera Delgado 98c81b
Alain Reguera Delgado 98c81b
    # Define default message we want to print.
Alain Reguera Delgado 98c81b
    local HELLO_GREETING="`gettext "Hello, World!"`"
Alain Reguera Delgado 98c81b
Alain Reguera Delgado 98c81b
    # Define actions variable. Here is where actions related to
Alain Reguera Delgado 98c81b
    # module-specific options are stored in.
Alain Reguera Delgado 98c81b
    local HELLO_ACTIONS=''
Alain Reguera Delgado 98c81b
Alain Reguera Delgado 98c81b
    # Interpret module-specific options and store related actions.
Alain Reguera Delgado 98c81b
    hello_getOptions
Alain Reguera Delgado 98c81b
Alain Reguera Delgado 98c81b
    # Initiate actions sub-module.
Alain Reguera Delgado 98c81b
    if [[ -n ${HELLO_ACTIONS} ]];then
Alain Reguera Delgado 98c81b
        tcar_setModuleEnvironment -m 'output' -t 'sub-module'
Alain Reguera Delgado 98c81b
    fi
Alain Reguera Delgado 98c81b
Alain Reguera Delgado 98c81b
}