Subversion Repositories ALCASAR

Rev

Rev 1953 | Rev 1985 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1953 Rev 1983
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-rpm-download.sh 1953 2016-06-18 06:18:11Z richard $
2
# $Id: alcasar-rpm-download.sh 1983 2016-07-08 10:14:42Z raphael.pion $
3
 
3
 
4
# alcasar-urpmi.sh
4
# alcasar-urpmi.sh
5
# by Franck BOUIJOUX and Richard REY
5
# by Franck BOUIJOUX and Richard REY
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
 
7
 
Line 20... Line 20...
20
downloader: wget
20
downloader: wget
21
}
21
}
22
EOF
22
EOF
23
urpmi.addmedia --probe-synthesis --mirrorlist ${!MIRRORLIST} core /media/core/release
23
urpmi.addmedia --probe-synthesis --mirrorlist ${!MIRRORLIST} core /media/core/release
24
urpmi.addmedia --update --probe-synthesis --mirrorlist ${!MIRRORLIST} core_updates /media/core/updates
24
urpmi.addmedia --update --probe-synthesis --mirrorlist ${!MIRRORLIST} core_updates /media/core/updates
-
 
25
urpmi.addmedia --probe-synthesis --mirrorlist ${!MIRRORLIST} non-free /media/nonfree/release
25
}
26
}
26
 
27
 
27
rpm_error ()
28
rpm_error ()
28
{
29
{
29
echo
30
echo
Line 57... Line 58...
57
#                       For french ALCASARistes
58
#                       For french ALCASARistes
58
MIRRORLIST1="http://www.mirrorservice.org/sites/mageia.org/pub/mageia/distrib/$VERSION/$ARCH"
59
MIRRORLIST1="http://www.mirrorservice.org/sites/mageia.org/pub/mageia/distrib/$VERSION/$ARCH"
59
#                       For International install
60
#                       For International install
60
MIRRORLIST2="http://mirrors.mageia.org/api/mageia.$VERSION.$ARCH.list"
61
MIRRORLIST2="http://mirrors.mageia.org/api/mageia.$VERSION.$ARCH.list"
61
try_nb="0"; nb_repository="0"
62
try_nb="0"; nb_repository="0"
62
while [ "$nb_repository" != "2" ]
63
while [ "$nb_repository" != "3" ]
63
do
64
do
64
	try_nb=`expr $try_nb + 1`
65
	try_nb=`expr $try_nb + 1`
65
	MIRRORLIST="MIRRORLIST$try_nb"
66
	MIRRORLIST="MIRRORLIST$try_nb"
66
	rpm_repository_sync 
67
	rpm_repository_sync 
67
	nb_repository=`cat /etc/urpmi/urpmi.cfg|grep mirrorlist|wc -l`
68
	nb_repository=`cat /etc/urpmi/urpmi.cfg|grep mirrorlist|wc -l`
68
	if [ "$nb_repository" != "2" ]
69
	if [ "$nb_repository" != "3" ]
69
	then
70
	then
70
		echo "Une erreur a été détectée lors de la synchronisation avec le dépot N°$try_nb."
71
		echo "Une erreur a été détectée lors de la synchronisation avec le dépot N°$try_nb."
71
		echo "An error occurs when synchronising the repositories N°$try_nb"
72
		echo "An error occurs when synchronising the repositories N°$try_nb"
72
		if [ $(expr $try_nb) -eq $MIRROR_NBR ]
73
		if [ $(expr $try_nb) -eq $MIRROR_NBR ]
73
		then
74
		then