8,6 → 8,7 |
# script de mise en place des dépots RPM |
# configure the RPM repository |
|
Lang=`echo $LANG|cut -c 1-2` |
VERSION="2" |
ARCH="i586" |
# ****** Alcasar needed RPMS - paquetages nécessaires au fonctionnement d'Alcasar ****** |
28,10 → 29,14 |
rpm_error () |
{ |
echo |
echo "Relancez l'installation ultérieurement." |
echo "Si vous rencontrez à nouveau ce problème, modifier les variables MIRRORLIST[1&2] du fichier 'scripts/alcasar-urpmi.sh'" |
echo "Try an other install later." |
echo "If this problem occurs again, change the MIRRORLIST[1&2] variables in the file 'scripts/alcasar-urpmi.sh'" |
if [ $Lang == "fr" ] |
then |
echo "Relancez l'installation ultérieurement." |
echo "Si vous rencontrez à nouveau ce problème, modifier les variables MIRRORLIST[1&2] du fichier 'scripts/alcasar-urpmi.sh'" |
else |
echo "Try an other install later." |
echo "If this problem occurs again, change the MIRRORLIST[1&2] variables in the file 'scripts/alcasar-urpmi.sh'" |
fi |
} |
# extract the current Mandriva/Mageia version and hardware architecture (i586 ou X64) |
fic=`cat /etc/product.id` |
59,16 → 64,28 |
done |
IFS="$old" |
if [[ ( $unknown_os != 3 || "$DISTRIBUTION" != "Mageia" ) && ( "$CURRENT_VERSION" != "2" ) ]] |
then |
if [ $Lang == "fr" ] |
then |
echo "La migration automatique d'ALCASAR ne peut pas être réalisée." |
echo "Le système d'exploitation doit être remplacer" |
else |
echo "The automatic update of ALCASAR can't be performed." |
echo "The OS must be replaced" |
fi |
if [ -e /tmp/alcasar-conf.tar.gz ] |
then |
echo "le système Linux installé n'est pas conforme. Installez Mageia2 (cf documentation d'installation)" |
echo "the installed Linux operating system isn't conform. Install Mageia2 (see installation documentation)" |
if [ -e /tmp/alcasar-conf.tar.gz ] |
then |
echo |
echo "La migration automatique du système ne peut pas être réalisée." |
echo "Récupérez le fichier /tmp/alcasar-conf.tar.gz et faites une mise à jour manuelle (cf. readme.txt)." |
echo "The automatic system update can't perform." |
echo "Retrieve the file /tmp/alcasar-conf.tar.gz and do a manual update (see readme.txt)." |
if [ $Lang == "fr" ] |
then |
echo "1 - Récupérez le fichier de configuration actuel (/tmp/alcasar-conf.tar.gz)." |
echo "2 - Installez Linux-Mageia2 (cf. doc d'installation)" |
echo "3 - copiez le fichier 'alcasar-conf.tar.gz' dans le répertoire '/tmp' avant de lancez l'installation d'ALCASAR" |
else |
echo "1 - Retrieve the configuration file (/tmp/alcasar-conf.tar.gz)" |
echo "2 - Install Linux-Mageia2 (cf. installation doc)" |
echo "3 - Copy the file 'alcasar-conf.tar.gz' in the folder '/tmp' before launching the installation of ALCASAR" |
fi |
fi |
exit 1 |
fi |
89,15 → 106,23 |
nb_repository=`cat /etc/urpmi/urpmi.cfg|grep mirrorlist|wc -l` |
if [ "$nb_repository" != "2" ] |
then |
echo "Une erreur a été détectée lors de la synchronisation avec le dépot N°$try_nb." |
echo "An error occurs when synchronising the repositories N°$try_nb" |
if [ $Lang == "fr" ] |
then |
echo "Une erreur a été détectée lors de la synchronisation avec le dépot N°$try_nb." |
else |
echo "An error occurs when synchronising the repositories N°$try_nb" |
fi |
if [ $(expr $try_nb) -eq $MIRROR_NBR ] |
then |
rpm_error |
exit 1 |
fi |
echo "Voulez-vous tenter une synchronisation avec un autre dépôt?" |
echo "Do you wan't to try a synchronisation with an other repository?" |
if [ $Lang == "fr" ] |
then |
echo "Voulez-vous tenter une synchronisation avec un autre dépôt?" |
else |
echo "Do you wan't to try a synchronisation with an other repository?" |
fi |
response=0 |
PTN='^[oOnNyY]$' |
until [[ $(expr $response : $PTN) -gt 0 ]] |
119,16 → 144,24 |
done |
echo |
# download RPM in cache |
echo "Récupération des paquetages de mise à jour. Veuillez patienter ..." |
echo "Updated RPM download. Please wait ..." |
echo "Il est temps d'aller prendre un café :-) " |
echo "You should now take a Beer ;-) " |
if [ $Lang == "fr" ] |
then |
echo "Récupération des paquetages de mise à jour. Veuillez patienter ..." |
echo "Il est temps d'aller prendre un café (ou une bonne bière) ;-)" |
else |
echo "Updated RPM download. Please wait ..." |
echo "You should now take a coffe (or a good beer) ;-)" |
fi |
urpmi --auto --auto-update --quiet --test --retry 2 |
if [ "$?" != "0" ] |
then |
echo |
echo "Une erreur a été détectée lors de la récupération des paquetages." |
echo "An error occurs when downloading RPMS" |
if [ $Lang == "fr" ] |
then |
echo "Une erreur a été détectée lors de la récupération des paquetages." |
else |
echo "An error occurs when downloading RPMS" |
fi |
rpm_error |
exit 1 |
fi |
137,8 → 170,12 |
if [ "$?" != "0" ] |
then |
echo |
echo "Une erreur a été détectée lors de la mise à jour des paquetages." |
echo "An error occurs when updating packages" |
if [ $Lang == "fr" ] |
then |
echo "Une erreur a été détectée lors de la mise à jour des paquetages." |
else |
echo "An error occurs when updating packages" |
fi |
rpm_error |
exit 1 |
fi |
145,14 → 182,22 |
# Clean the RPM cache |
urpmi --clean |
# Download of ALCASAR specifics RPM in cache (and test) |
echo "Récupération des paquetages complémentaires. Veuillez patienter ..." |
echo "Download of complementary packages. Please wait ..." |
if [ $Lang == "fr" ] |
then |
echo "Récupération des paquetages complémentaires. Veuillez patienter ..." |
else |
echo "Download of complementary packages. Please wait ..." |
fi |
urpmi --auto $PACKAGES --quiet --test --retry 2 |
if [ "$?" != "0" ] |
then |
echo |
echo "Une erreur a été détectée lors de la récupération des paquetages complémentaires." |
echo "An error occurs when downloading complementary packages" |
if [ $Lang == "fr" ] |
then |
echo "Une erreur a été détectée lors de la récupération des paquetages complémentaires." |
else |
echo "An error occurs when downloading complementary packages" |
fi |
rpm_error |
exit 1 |
fi |
161,8 → 206,12 |
if [ "$?" != "0" ] |
then |
echo |
echo "Une erreur a été détectée lors de l'installation des paquetages complémentaires." |
echo "An error occurs when installing complementary packages" |
if [ $Lang == "fr" ] |
then |
echo "Une erreur a été détectée lors de l'installation des paquetages complémentaires." |
else |
echo "An error occurs when installing complementary packages" |
fi |
rpm_error |
exit 1 |
fi |
180,4 → 229,3 |
# Clean the RPM cache |
urpmi --clean |
exit 0 |
|