Blame Scripts/Bash/Functions/Prepare/prepare_updateEnvironment.sh

de3499
#!/bin/bash
de3499
#
de3499
# prepare_updateEnvironment.sh -- This function updates the
de3499
# ~/.bash_profile file to provide default configuration values to
de3499
# centos-art.sh script.
de3499
#
de3499
# Copyright (C) 2009, 2010, 2011, 2012 The CentOS Project
de3499
#
de3499
# This program is free software; you can redistribute it and/or modify
de3499
# it under the terms of the GNU General Public License as published by
de3499
# the Free Software Foundation; either version 2 of the License, or (at
de3499
# your option) any later version.
de3499
#
de3499
# This program is distributed in the hope that it will be useful, but
de3499
# WITHOUT ANY WARRANTY; without even the implied warranty of
de3499
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
de3499
# General Public License for more details.
de3499
#
de3499
# You should have received a copy of the GNU General Public License
de3499
# along with this program; if not, write to the Free Software
de3499
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
de3499
#
de3499
# ----------------------------------------------------------------------
1da4b2
# $Id$
de3499
# ----------------------------------------------------------------------
de3499
de3499
function prepare_updateEnvironment {
de3499
de3499
    local BASH_PROFILE=bash_profile
de3499
    local SOURCE=${PREPARE_CONFIG_DIR}/${BASH_PROFILE}.conf
de3499
    local TARGET=${HOME}/.${BASH_PROFILE}
de3499
de3499
    # Print action message.
de3499
    cli_printMessage "`gettext "${HOME}/.${BASH_PROFILE}"`" --as-updating-line
de3499
de3499
    # Copy default configuration file to its final destination. Note
de3499
    # that we are not making a link here in order for different users
de3499
    # to be able of using different values in their own environments.
de3499
    cp -f $SOURCE $TARGET
de3499
de3499
}