Subversion Repositories ALCASAR

Rev

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

Rev 2758 Rev 2760
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-urpmi.sh 2758 2019-11-03 23:17:20Z rexy $
2
# $Id: alcasar-urpmi.sh 2760 2019-11-06 12:26:49Z lucas.echard $
3
 
3
 
4
# alcasar-urpmi.sh
4
# alcasar-urpmi.sh
5
# by 3abtux and Rexy
5
# by 3abtux and Rexy
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 97... Line 97...
97
		fi
97
		fi
98
		if [ $Lang == "fr" ]
98
		if [ $Lang == "fr" ]
99
		then
99
		then
100
			echo "Voulez-vous tenter une synchronisation avec un autre dépôt ? (O/n)"
100
			echo "Voulez-vous tenter une synchronisation avec un autre dépôt ? (O/n)"
101
		else
101
		else
102
			echo "Do you wan't to try a synchronisation with an other repository? (Y/n)"
102
			echo "Do you want to try a synchronisation with an other repository? (Y/n)"
103
		fi
103
		fi
104
		response=0
104
		response=0
105
		PTN='^[oOnNyY]$'
105
		PTN='^[oOnNyY]?$'
106
		until [[ $(expr $response : $PTN) -gt 0 ]]
106
		until [[ "$response" =~ $PTN ]]
107
		do
107
		do
108
			read response
108
			read response
109
		done
109
		done
110
		if [ "$response" = "n" ] || [ "$response" = "N" ]
110
		if [ "$response" = "n" ] || [ "$response" = "N" ]
111
		then
111
		then
Line 229... Line 229...
229
/sbin/depmod -a
229
/sbin/depmod -a
230
# test if all needed rpms are correctly installed
230
# test if all needed rpms are correctly installed
231
count_pkg=0; nb_pkg=0;
231
count_pkg=0; nb_pkg=0;
232
for pkg in $PACKAGES
232
for pkg in $PACKAGES
233
do
233
do
234
	nb_pkg=`expr $nb_pkg + 1`	
234
	nb_pkg=`expr $nb_pkg + 1`
235
	if rpm -q --quiet $pkg ; then
235
	if rpm -q --quiet $pkg ; then
236
		count_pkg=`expr $count_pkg + 1`
236
		count_pkg=`expr $count_pkg + 1`
237
	else
237
	else
238
		echo "error installing $pkg"
238
		echo "error installing $pkg"
239
	fi		
239
	fi
240
done
240
done
241
if [ $count_pkg -ne $nb_pkg ]
241
if [ $count_pkg -ne $nb_pkg ]
242
then
242
then
243
	exit 1
243
	exit 1
244
fi
244
fi
245
# test if all custom rpms are correctly installed
245
# test if all custom rpms are correctly installed
246
#count_pkg=0; nb_pkg=0;
246
#count_pkg=0; nb_pkg=0;
247
#for pkg in `ls rpms/$ARCH/|tr -d .rpm`
247
#for pkg in `ls rpms/$ARCH/|tr -d .rpm`
248
#do
248
#do
249
#	nb_pkg=`expr $nb_pkg + 1`	
249
#	nb_pkg=`expr $nb_pkg + 1`
250
#	if rpm -q --quiet $pkg ; then
250
#	if rpm -q --quiet $pkg ; then
251
#		count_pkg=`expr $count_pkg + 1`
251
#		count_pkg=`expr $count_pkg + 1`
252
#	else
252
#	else
253
#		echo "error installing $pkg"
253
#		echo "error installing $pkg"
254
#	fi		
254
#	fi
255
#done
255
#done
256
#if [ $count_pkg -ne $nb_pkg ]
256
#if [ $count_pkg -ne $nb_pkg ]
257
#then
257
#then
258
#	exit 1
258
#	exit 1
259
#fi
259
#fi