Subversion Repositories ALCASAR

Rev

Details | Last modification | View Log

Rev Author Line No. Line
1 root 1
#!/bin/sh
2
# script d'ajout des medias logiciels 
3
# 3abtux & rexy
4
# changelog :
5
# 	+ prise en compte dynamique de la version de la distribution
6
#	+ prise en compte de la nouvelle struture RPM
29 richard 7
#	+ test avant sortie
1 root 8
 
9
fic=`cat /etc/product.id`
10
old="$IFS"
11
IFS=","
12
set $fic
13
for i in $*
14
do
15
	if [ "`echo $i|grep arch|cut -d'=' -f1`" == "arch" ]
16
	then 
17
		ARCH=`echo $i|cut -d"=" -f2`
18
	fi
19
	if [ "`echo $i|grep version|cut -d'=' -f1`" == "version" ]
20
	then 
21
		VERSION=`echo $i|cut -d"=" -f2`
22
	fi
23
done
24
IFS="$old"
29 richard 25
 
26
# For International install
27
# MIRRORLIST="http://api.mandriva.com/mirrors/basic.$VERSION.$ARCH.list"
28
 
29
# For french ALCASARistes
30
MIRRORLIST="http://ftp.free.fr/pub/Distributions_Linux/MandrivaLinux/official/$VERSION/$ARCH"
31
 
1 root 32
urpmi.removemedia -a
29 richard 33
urpmi.addmedia --probe-synthesis --mirrorlist $MIRRORLIST main /media/main/release
34
urpmi.addmedia --probe-synthesis --mirrorlist $MIRRORLIST main_updates /media/main/updates
35
urpmi.addmedia --probe-synthesis --mirrorlist $MIRRORLIST contrib /media/contrib/release
36
urpmi.addmedia --probe-synthesis --mirrorlist $MIRRORLIST contrib_updates /media/contrib/updates
37
nb_repository=`cat /etc/urpmi/urpmi.cfg|grep mirrorlist|wc -l`
38
if [ "$nb_repository" != "4" ]
39
then
40
	exit 1
41
	else exit 0
42
fi
43