Subversion Repositories ALCASAR

Rev

Rev 64 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

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