#!/bin/bash

source ~/.bash_profile

rsync -av --progress rsync://mirrors.ustc.edu.cn/centos/ /data/app/nginx/yum_repos/centos/
rsync -av --progress rsync://mirrors.ustc.edu.cn/epel/ /data/app/nginx/yum_repos/epel/


createrepo /data/app/nginx/yum_repos/mysql/mysql-connectors-community/6
createrepo /data/app/nginx/yum_repos/mysql/mysql-tools-community/6
createrepo /data/app/nginx/yum_repos/mysql/mysql56-community/6
createrepo /data/app/nginx/yum_repos/kudu/cloudera-kudu/6

createrepo /data/app/nginx/yum_repos/mysql/mysql-connectors-community/7
createrepo /data/app/nginx/yum_repos/mysql/mysql-tools-community/7
createrepo /data/app/nginx/yum_repos/mysql/mysql56-community/7
createrepo /data/app/nginx/yum_repos/kudu/cloudera-kudu/7
