| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function prepare_updateEnvironment { |
| |
| |
| |
| |
| if [[ ! $0 =~ "^/[[:alnum:]/_-]+${CLI_NAME}.sh$" ]];then |
| cli_printMessage "`gettext "To set environment variables you should run centos-art.sh using its abosolute path."`" --as-error-line |
| fi |
| |
| local PROFILE=bash_profile |
| local SOURCE=${PREPARE_CONFIG_DIR}/${PROFILE}.conf |
| local TARGET=${HOME}/.${PROFILE} |
| |
| |
| |
| |
| |
| local TCAR_WORKDIR=$(echo "$0" | sed -r 's!^(.+)/trunk.*!\1!') |
| |
| |
| |
| |
| |
| local TCAR_BRAND='centos' |
| |
| |
| cli_printMessage "${TARGET}" --as-updating-line |
| |
| |
| |
| |
| cp -f $SOURCE $TARGET |
| |
| |
| sed -i -r \ |
| -e "s,^(TCAR_WORKDIR=).*,\1${TCAR_WORKDIR}," \ |
| -e "s,^(TCAR_BRAND=).*,\1${TCAR_BRAND}," \ |
| ${TARGET} |
| |
| } |