<commit_before>#!/bin/bash
# Author:  yeho <lj2007331 AT gmail.com>
# Blog:  http://blog.linuxeye.com

cd src
. ../functions/download.sh
src_url=http://yum.baseurl.org/download/3.4/yum-3.4.3.tar.gz && Download_src
tar zxf yum-3.4.3.tar.gz
cd yum-3.4.3
./yummain.py install yum -y
cd ..
sed -i 's@^exclude@#exclude@' /etc/yum.conf
yum clean all

if [ "`../functions/get_ip_area.py $IP`" == 'CN' ];then
        mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bk
	[ ! -z "$(cat /etc/redhat-release | grep '6\.')" ] && wget -c http://mirrors.163.com/.help/CentOS6-Base-163.repo -P /etc/yum.repos.d
	[ ! -z "$(cat /etc/redhat-release | grep '5\.')" ] && wget -c http://mirrors.163.com/.help/CentOS5-Base-163.repo -P /etc/yum.repos.d
	yum makecache
fi

if [ ! -z "$(cat /etc/redhat-release | grep '6\.')" ];then
	yum -y groupremove "FTP Server" "Text-based Internet" "Windows File Server" "PostgreSQL Database" "News Server" "MySQL Database" "DNS Name Server" "Web Server" "Dialup Networking Support" "Mail Server" "Ruby" "Office/Productivity" "Sound and Video" "X Window System" "X Software Development" "Printing Support" "OpenFabrics Enterprise Distribution"
else
	yum -y groupremove "FTP Server" "PostgreSQL Database client" "PostgreSQL Database server" "MySQL Database server" "MySQL Database client" "Web Server" "Office Suite and Productivity" "Ruby Support" "X Window System" "Printing client" "Desktop*"
fi

# update rpm packages
yum check-update
yum -y update

# check upgrade OS
[ "$upgrade_yn" == 'y' ] && yum -y upgrade

# Install needed packages<commit_msg>upgrade OS issue<commit_after>#!/bin/bash
# Author:  yeho <lj2007331 AT gmail.com>
# Blog:  http://blog.linuxeye.com

cd src
. ../functions/download.sh
src_url=http://yum.baseurl.org/download/3.4/yum-3.4.3.tar.gz && Download_src
tar zxf yum-3.4.3.tar.gz
cd yum-3.4.3
./yummain.py install yum -y
cd ..
sed -i 's@^exclude@#exclude@' /etc/yum.conf
yum clean all

if [ "`../functions/get_ip_area.py $IP`" == 'CN' ];then
        mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bk
	[ ! -z "$(cat /etc/redhat-release | grep '6\.')" ] && wget -c http://mirrors.163.com/.help/CentOS6-Base-163.repo -P /etc/yum.repos.d
	[ ! -z "$(cat /etc/redhat-release | grep '5\.')" ] && wget -c http://mirrors.163.com/.help/CentOS5-Base-163.repo -P /etc/yum.repos.d
	yum makecache
fi

if [ ! -z "$(cat /etc/redhat-release | grep '6\.')" ];then
	yum -y groupremove "FTP Server" "Text-based Internet" "Windows File Server" "PostgreSQL Database" "News Server" "MySQL Database" "DNS Name Server" "Web Server" "Dialup Networking Support" "Mail Server" "Ruby" "Office/Productivity" "Sound and Video" "X Window System" "X Software Development" "Printing Support" "OpenFabrics Enterprise Distribution"
else
	yum -y groupremove "FTP Server" "PostgreSQL Database client" "PostgreSQL Database server" "MySQL Database server" "MySQL Database client" "Web Server" "Office Suite and Productivity" "Ruby Support" "X Window System" "Printing client" "Desktop*"
fi

yum check-update

# check upgrade OS
[ "$upgrade_yn" == 'y' ] && yum -y update 

# Install needed packages
{'fraction_non_alphanumeric': 0.16862869869551383, 'fraction_numerical': 0.022271714922048998, 'mean_word_length': 3.8073394495412844, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7418533', 'n_tokens_mistral': 1259, 'n_tokens_neox': 1167, 'n_words': 319}