Subversion Repositories ALCASAR

Rev

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

Rev 1007 Rev 1012
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-rpm-download.sh 1007 2013-01-05 15:14:32Z richard $
2
# $Id: alcasar-rpm-download.sh 1012 2013-01-20 22:33:33Z richard $
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 53... Line 53...
53
#                       For french ALCASARistes
53
#                       For french ALCASARistes
54
MIRRORLIST1="http://www.mirrorservice.org/sites/mageia.org/pub/mageia/distrib/$VERSION/$ARCH"
54
MIRRORLIST1="http://www.mirrorservice.org/sites/mageia.org/pub/mageia/distrib/$VERSION/$ARCH"
55
#                       For International install
55
#                       For International install
56
MIRRORLIST2="http://mirrors.mageia.org/api/mageia.$VERSION.$ARCH.list"
56
MIRRORLIST2="http://mirrors.mageia.org/api/mageia.$VERSION.$ARCH.list"
57
try_nb="0"; nb_repository="0"
57
try_nb="0"; nb_repository="0"
58
while [ "$nb_repository" != "4" ]
58
while [ "$nb_repository" != "2" ]
59
do
59
do
60
	try_nb=`expr $try_nb + 1`
60
	try_nb=`expr $try_nb + 1`
61
	MIRRORLIST="MIRRORLIST$try_nb"
61
	MIRRORLIST="MIRRORLIST$try_nb"
62
	rpm_repository_sync 
62
	rpm_repository_sync 
63
	nb_repository=`cat /etc/urpmi/urpmi.cfg|grep mirrorlist|wc -l`
63
	nb_repository=`cat /etc/urpmi/urpmi.cfg|grep mirrorlist|wc -l`
64
	if [ "$nb_repository" != "4" ]
64
	if [ "$nb_repository" != "2" ]
65
	then
65
	then
66
		echo "Une erreur a été détectée lors de la synchronisation avec le dépot N°$try_nb."
66
		echo "Une erreur a été détectée lors de la synchronisation avec le dépot N°$try_nb."
67
		echo "An error occurs when synchronising the repositories N°$try_nb"
67
		echo "An error occurs when synchronising the repositories N°$try_nb"
68
		if [ $(expr $try_nb) -eq $MIRROR_NBR ]
68
		if [ $(expr $try_nb) -eq $MIRROR_NBR ]
69
		then
69
		then
Line 134... Line 134...
134
tar -czf rpms-$ARCH.tar.gz rpms/
134
tar -czf rpms-$ARCH.tar.gz rpms/
135
# Clean the RPM cache
135
# Clean the RPM cache
136
urpmi --clean
136
urpmi --clean
137
mv rpms-$ARCH.tar.gz /root/
137
mv rpms-$ARCH.tar.gz /root/
138
cd
138
cd
139
echo "Your RPM archive : rpms-$ARCH.tar.gz"
139
echo "Your RPM archive file is /root/rpms-$ARCH.tar.gz"
140
exit 0
140
exit 0
141
 
141