MAJ=10.1
VER=10.1.45
REL=1
TYPE=linux2.6

RPM_OS=centos6

#http://mariadb.mirror.iweb.com/mariadb-5.5.38/source/mariadb-5.5.38.tar.gz
#http://mariadb.mirror.iweb.com/mariadb-5.5.38/yum/centos6-x86/rpms/
#http://mariadb.mirror.iweb.com/mariadb-5.5.38/yum/centos6-amd64/rpms/
#http://mirrors.accretive-networks.net/mariadb/mariadb-10.1.8/

#FROM_SERVER=http://mirror.csclub.uwaterloo.ca/mysql/
#FROM_SERVER=http://mirrors.accretive-networks.net/mariadb/mariadb-${VER}/
FROM_SERVER=http://mariadb.mirror.iweb.com/mariadb-${VER}
#FROM_SERVER=http://mariadb.mirror.rafal.ca/mariadb-${VER}
#FROM_SERVER=http://mariadb.mirror.anstey.ca/mariadb-${VER}

. ./includes/ensure.sh

doMain()
{
        echo -n "" > ${VER}/centos6-32.txt
        echo -n "" > ${VER}/centos6-64.txt
        echo -n "" > ${VER}/centos7-64.txt

        for i in backup server client devel shared common compat; do
        {
                echo "getting $i ...";
                grab $i centos6 centos6 centos6-32
                grab64 $i centos6 el6 centos6-64 type-first
		#grab64 $i centos7 centos73 centos7-64
		grab64 $i centos73 el7.centos centos7-64 type-first
        };
        done;
}

doAllDebian()
{
	#mariadb-10.0.17-linux-glibc_214-i686.tar.gz
	#http://mariadb.mirror.iweb.com/mariadb-10.0.17/bintar-linux-glibc_214-x86/mariadb-10.0.17-linux-glibc_214-i686.tar.gz
        #mariadb-10.0.17-linux-glibc_214-x86_64.tar.gz
        #mariadb-10.0.17-linux-x86_64.tar.gz
        #mariadb-10.0.17-linux-i686.tar.gz
	#http://mariadb.mirror.iweb.com/mariadb-10.0.17/bintar-linux-x86/mariadb-10.0.17-linux-i686.tar.gz

#	doDebian glibc_214-i686 glibc_214-x86
	doDebian glibc_214-x86_64
	doDebian x86_64
#	doDebian i686 x86
}

mkdir -p $MAJ
cd $MAJ
CWD=`pwd`
mkdir -p $VER

	doMain

	cd $CWD
	doAllDebian

	cd $CWD
	wget -O ${VER}/mariadb-${VER}.tar.gz ${FROM_SERVER}/source/mariadb-${VER}.tar.gz

	ensure ${VER}/mariadb-${VER}.tar.gz

exit 0;

