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
|
|
|
7 |
# + préparation des repository pour les mises à jour
|
|
|
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"
|
|
|
25 |
REPOSITORY="http://ftp.free.fr/mirrors/ftp.mandriva.com/MandrivaLinux/official/$VERSION/$ARCH/media"
|
|
|
26 |
urpmi.removemedia -a
|
|
|
27 |
urpmi.addmedia main $REPOSITORY/main/release with media_info/synthesis.hdlist.cz
|
|
|
28 |
urpmi.addmedia --update main_updates $REPOSITORY/main/updates with media_info/synthesis.hdlist.cz
|
|
|
29 |
urpmi.addmedia contrib $REPOSITORY/contrib/release with media_info/synthesis.hdlist.cz
|
|
|
30 |
urpmi.addmedia --update contrib_updates $REPOSITORY/contrib/updates with media_info/synthesis.hdlist.cz
|