Subversion Repositories ALCASAR

Rev

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

Rev 518 Rev 525
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
# $Id: alcasar-urpmi.sh 518 2011-03-25 16:04:12Z stephane $
2
# $Id: alcasar-urpmi.sh 525 2011-03-30 21:21:36Z richard $
3
# script de mise en place des dépots RPM 
3
# script de mise en place des dépots RPM 
4
# 3abtux & rexy
4
# 3abtux & rexy
5
 
5
 
6
VERSION="2010.2"
6
VERSION="2010.2"
7
ARCH="i586"
7
ARCH="i586" 
8
#                       For french ALCASARistes
-
 
9
MIRRORLIST1="http://ftp.free.fr/pub/Distributions_Linux/MandrivaLinux/official/$VERSION/$ARCH"
-
 
10
#                       For International install
-
 
11
MIRRORLIST2="http://api.mandriva.com/mirrors/basic.$VERSION.$ARCH.list"
-
 
12
MIRROR_NBR=2
-
 
13
 
8
 
14
rpm_repository_sync ()
9
rpm_repository_sync ()
15
{
10
{
16
echo ${!MIRRORLIST}
11
echo ${!MIRRORLIST}
17
urpmi.removemedia -a
12
urpmi.removemedia -a
18
urpmi.addmedia --wget --probe-synthesis --mirrorlist ${!MIRRORLIST} main /media/main/release
13
urpmi.addmedia --wget --probe-synthesis --mirrorlist ${!MIRRORLIST} main /media/main/release
-
 
14
urpmi wget
19
urpmi.addmedia --wget --update --probe-synthesis --mirrorlist ${!MIRRORLIST} main_updates /media/main/updates
15
urpmi.addmedia --wget --update --probe-synthesis --mirrorlist ${!MIRRORLIST} main_updates /media/main/updates
20
urpmi.addmedia --wget --probe-synthesis --mirrorlist ${!MIRRORLIST} contrib /media/contrib/release
16
urpmi.addmedia --wget --probe-synthetis --mirrorlist ${!MIRRORLIST} contrib /media/contrib/release
21
urpmi.addmedia --wget --update --probe-synthesis --mirrorlist ${!MIRRORLIST} contrib_updates /media/contrib/updates
17
urpmi.addmedia --wget --update --probe-synthesis --mirrorlist ${!MIRRORLIST} contrib_updates /media/contrib/updates
22
}
18
}
23
 
19
 
24
# extract the current Mandriva version and hardware architecture (i586 ou X64)
20
# extract the current Mandriva version and hardware architecture (i586 ou X64)
25
fic=`cat /etc/product.id`
21
fic=`cat /etc/product.id`
Line 45... Line 41...
45
		ARCH=`echo $i|cut -d"=" -f2`
41
		ARCH=`echo $i|cut -d"=" -f2`
46
	fi
42
	fi
47
done
43
done
48
IFS="$old"
44
IFS="$old"
49
# Set the RPM repository
45
# Set the RPM repository
-
 
46
MIRROR_NBR=2
-
 
47
#                       For french ALCASARistes
-
 
48
MIRRORLIST1="http://ftp.free.fr/pub/Distributions_Linux/MandrivaLinux/official/$VERSION/$ARCH"
-
 
49
#                       For International install
-
 
50
MIRRORLIST2="http://api.mandriva.com/mirrors/basic.$VERSION.$ARCH.list"
50
try_nb="0"; nb_repository="0"
51
try_nb="0"; nb_repository="0"
51
while [ "$nb_repository" != "4" ]
52
while [ "$nb_repository" != "4" ]
52
do
53
do
53
	try_nb=`expr $try_nb + 1`
54
	try_nb=`expr $try_nb + 1`
54
	MIRRORLIST="MIRRORLIST$try_nb"
55
	MIRRORLIST="MIRRORLIST$try_nb"