Subversion Repositories ALCASAR

Rev

Go to most recent revision | Blame | Last modification | View Log

#!/bin/sh
# script d'ajout des medias logiciels 
# 3abtux & rexy
# changelog :
#       + prise en compte dynamique de la version de la distribution
#       + prise en compte de la nouvelle struture RPM
#       + préparation des repository pour les mises à jour

fic=`cat /etc/product.id`
old="$IFS"
IFS=","
set $fic
for i in $*
do
        if [ "`echo $i|grep arch|cut -d'=' -f1`" == "arch" ]
        then 
                ARCH=`echo $i|cut -d"=" -f2`
        fi
        if [ "`echo $i|grep version|cut -d'=' -f1`" == "version" ]
        then 
                VERSION=`echo $i|cut -d"=" -f2`
        fi
done
IFS="$old"
REPOSITORY="http://ftp.free.fr/mirrors/ftp.mandriva.com/MandrivaLinux/official/$VERSION/$ARCH/media"
urpmi.removemedia -a
urpmi.addmedia main $REPOSITORY/main/release with media_info/synthesis.hdlist.cz
urpmi.addmedia --update main_updates $REPOSITORY/main/updates with media_info/synthesis.hdlist.cz
urpmi.addmedia contrib $REPOSITORY/contrib/release with media_info/synthesis.hdlist.cz
urpmi.addmedia --update contrib_updates $REPOSITORY/contrib/updates with media_info/synthesis.hdlist.cz