Subversion Repositories ALCASAR

Rev

Rev 793 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 793 Rev 799
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
# $Id: alcasar-urpmi.sh 793 2012-01-16 22:31:32Z richard $
2
# $Id: alcasar-urpmi.sh 799 2012-02-01 21:16:37Z richard $
3
 
3
 
4
# alcasar-urpmi.sh
4
# alcasar-urpmi.sh
5
# by Franck BOUIJOUX and Richard REY
5
# by Franck BOUIJOUX and Richard REY
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
 
7
 
Line 110... Line 110...
110
urpmi --downloader wget --auto --auto-update --quiet --test --retry 2
110
urpmi --downloader wget --auto --auto-update --quiet --test --retry 2
111
if [ "$?" != "0" ]
111
if [ "$?" != "0" ]
112
then
112
then
113
	echo
113
	echo
114
	echo "Une erreur a été détectée lors de la récupération des paquetages."
114
	echo "Une erreur a été détectée lors de la récupération des paquetages."
115
	echo "An error occurs when downloading"
115
	echo "An error occurs when downloading RPMS"
116
	rpm_error
116
	rpm_error
117
	exit 1
117
	exit 1
118
fi
118
fi
119
# update with cached RPM
119
# update with cached RPM
120
urpmi --auto --auto-update
120
urpmi --auto --auto-update
-
 
121
if [ "$?" != "0" ]
-
 
122
then
-
 
123
	echo
-
 
124
	echo "Une erreur a été détectée lors de la mise à jour des paquetages."
-
 
125
	echo "An error occurs when updating packages"
-
 
126
	rpm_error
-
 
127
	exit 1
-
 
128
fi
121
# Clean the RPM cache
129
# Clean the RPM cache
122
urpmi --clean
130
urpmi --clean
123
# Download of ALCASAR specifics RPM in cache (and test)
131
# Download of ALCASAR specifics RPM in cache (and test)
124
echo "Récupération des paquetages complémentaires. Veuillez patienter ..."
132
echo "Récupération des paquetages complémentaires. Veuillez patienter ..."
125
echo "Download of complementary packages. Please wait ..."
133
echo "Download of complementary packages. Please wait ..."
Line 132... Line 140...
132
	rpm_error
140
	rpm_error
133
	exit 1
141
	exit 1
134
fi
142
fi
135
# update with cached RPM
143
# update with cached RPM
136
urpmi --auto $PACKAGES 
144
urpmi --auto $PACKAGES 
-
 
145
if [ "$?" != "0" ]
-
 
146
then
-
 
147
	echo
-
 
148
	echo "Une erreur a été détectée lors de l'installation des paquetages complémentaires."
-
 
149
	echo "An error occurs when installing complementary packages"
-
 
150
	rpm_error
-
 
151
	exit 1
-
 
152
fi
137
# delete old alcasar RPMs
153
# delete old alcasar RPMs
138
for rm_rpm in c-icap-server lib64chilli0 libchilli0 python-coova-chilli
154
for rm_rpm in c-icap-server lib64chilli0 libchilli0 python-coova-chilli
139
do
155
do
140
	/usr/sbin/urpme --auto $rm_rpm --auto-orphans 2>/dev/null
156
	/usr/sbin/urpme --auto $rm_rpm --auto-orphans 2>/dev/null
141
done
157
done