#!/bin/bash
export LANG=C.UTF-8
Red='\033[0;31m'        # Red
Yellow='\033[0;33m'     # Yellow
NC='\033[0m'            # No Color
clear

message="=============================================="
thanks_message="=============> Cảm ơn quý khách <============="
clean_default_repo="Quá trình update thông tin repo về HT thành công"
contact_message="Cần thêm thông tin hoặc cần hỗ trợ vui lòng truy cập https://hoatoc.vn hoặc liên lạc sđt: 0792040404"

for (( i=0; i<${#message}; i++ )); do
  echo -ne "${Yellow}${message:$i:1}${NC}"
  sleep 0.05
done
echo

curl -o /etc/yum.repos.d/CentOS-Base.repo https://centos-repo.htn.cloud/script/CentOS-Base.repo

for (( i=0; i<${#clean_default_repo}; i++ )); do
  echo -ne "${Yellow}${clean_default_repo:$i:1}${NC}"
  sleep 0.05
done
echo

yum clean all

for (( i=0; i<${#done_message}; i++ )); do
  echo -ne "${Yellow}${done_message:$i:1}${NC}"
  sleep 0.05
done
echo
for (( i=0; i<${#message}; i++ )); do
  echo -ne "${Yellow}${message:$i:1}${NC}"
  sleep 0.05
done
echo
for (( i=0; i<${#contact_message}; i++ )); do
  echo -ne "${Yellow}${contact_message:$i:1}${NC}"
  sleep 0.05
done
echo
for (( i=0; i<${#thanks_message}; i++ )); do
  echo -ne "${Yellow}${thanks_message:$i:1}${NC}"
  sleep 0.05
done
echo
