Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 120576
Collapse All | Expand All

(-)/usr/sbin/etc-update (-6 / +19 lines)
Lines 10-15 Link Here
10
# Leo Lipelis <aeoo@gentoo.org>
10
# Leo Lipelis <aeoo@gentoo.org>
11
# Karl Trygve Kalleberg <karltk@gentoo.org>
11
# Karl Trygve Kalleberg <karltk@gentoo.org>
12
12
13
# Colors added by Stefan Berggren
14
# only tested on cvs v 1.23.2.5 2005/05/29 12:40:08
15
# Use my patch on your own risk
16
17
rm_color_start='\033[1m\033[31m' # Bold red text
18
rm_color_end='\033[0m' # reset
19
20
mv_color_start='\033[1m\033[32m' # Bold green text
21
mv_color_end='\033[0m' # reset
22
23
file_color_start='\033[1m' # Bold green text
24
file_color_end='\033[0m' # reset
25
13
export PORTAGE_CALLER="etc-update"
26
export PORTAGE_CALLER="etc-update"
14
27
15
eval $(python -c 'import portage; print "export PORTAGE_TMPDIR="+portage.settings["PORTAGE_TMPDIR"];')
28
eval $(python -c 'import portage; print "export PORTAGE_TMPDIR="+portage.settings["PORTAGE_TMPDIR"];')
Lines 107-116 Link Here
107
			if (( ${isfirst} == 0 )); then
120
			if (( ${isfirst} == 0 )); then
108
				isfirst=${file}
121
				isfirst=${file}
109
			fi
122
			fi
110
			echo -n "${file}${PAR} "
123
			echo -en "${file_color_start}${file}${PAR} "
111
			if (( ${mode} == 0 )); then
124
			if (( ${mode} == 0 )); then
112
				for word in `cat ${TMP}/files/${file}`; do
125
				for word in `cat ${TMP}/files/${file}`; do
113
					echo ${word}
126
					echo -e "${word}${file_color_end}"
114
				done
127
				done
115
			else
128
			else
116
				head -n1 ${TMP}/files/${file}
129
				head -n1 ${TMP}/files/${file}
Lines 259-266 Link Here
259
				echo "-------------------------------------------------------------"
272
				echo "-------------------------------------------------------------"
260
				echo
273
				echo
261
			fi
274
			fi
262
			echo -n "1) Replace original with update
275
			echo -en "${mv_color_start}1) Replace original with update${mv_color_end}
263
2) Delete update, keeping original as is
276
${rm_color_start}2) Delete update, keeping original as is${rm_color_end}
264
3) Interactively merge original with update
277
3) Interactively merge original with update
265
4) Show differences again
278
4) Show differences again
266
Please select from the menu above (-1 to ignore this update): "
279
Please select from the menu above (-1 to ignore this update): "
Lines 268-279 Link Here
268
		fi
281
		fi
269
		
282
		
270
		case ${my_input} in
283
		case ${my_input} in
271
			1) echo "Replacing ${ofile} with ${file}"
284
			1) echo -e "${mv_color_start}Replacing ${ofile} with ${file}${mv_color_end}"
272
			   mv ${mv_opts} ${file} ${ofile}
285
			   mv ${mv_opts} ${file} ${ofile}
273
			   my_input=-1
286
			   my_input=-1
274
			   continue
287
			   continue
275
			   ;;
288
			   ;;
276
			2) echo "Deleting ${file}"
289
			2) echo -e "${rm_color_start}Deleting ${file}${rm_color_end}"
277
			   rm ${rm_opts} ${file}
290
			   rm ${rm_opts} ${file}
278
			   continue
291
			   continue
279
			   ;;
292
			   ;;

Return to bug 120576