Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 23243 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/sbin/etc-update (-9 / +22 lines)
Lines 122-131 Link Here
122
				echo -n "                           (-5 to auto-merge AND not use 'mv -i'): "
122
				echo -n "                           (-5 to auto-merge AND not use 'mv -i'): "
123
				read input
123
				read input
124
			else
124
			else
125
				dialog --title "${title}" --menu "${my_title}" \
125
				input=`dialog --cancel-label "Exit" --title "${title}" --menu "${my_title}" 0 0 0 $(<${TMP}/menuitems) 2>&1 1>/dev/tty`
126
					0 0 0 `echo "-1 Exit";cat ${TMP}/menuitems` \
126
				if (( $? == 1 )); then input=-1; fi
127
					2> ${TMP}/input
128
				input=`cat ${TMP}/input`
129
			fi
127
			fi
130
			if (( ${input} == -5 )); then
128
			if (( ${input} == -5 )); then
131
				input=-3
129
				input=-3
Lines 176-185 Link Here
176
					echo -n "Please select a file to process (-1 to exit this file): "
174
					echo -n "Please select a file to process (-1 to exit this file): "
177
					read my_input
175
					read my_input
178
				else
176
				else
179
					dialog --title "${title}" --menu "${my_title}" \
177
					my_input=`dialog --title "${title}" --menu "${my_title}" 0 0 0 $(<${TMP}/menuitems) 2>&1 1>/dev/tty`
180
						0 0 0 `cat ${TMP}/menuitems;echo "${fcount} Exit"` \
178
					if (( $? == 1 )); then my_input=-1; fi
181
						2> ${TMP}/input
182
					my_input=`cat ${TMP}/input`
183
				fi
179
				fi
184
			fi # OVERWRITE_ALL
180
			fi # OVERWRITE_ALL
185
181
Lines 227-233 Link Here
227
		  showdiffcmd=$(echo "${diff_command}" |
223
		  showdiffcmd=$(echo "${diff_command}" |
228
				sed -e "s:%file1:${ofile}:" -e "s:%file2:${file}:")
224
				sed -e "s:%file1:${ofile}:" -e "s:%file2:${file}:")
229
				
225
				
230
			if [ "${using_editor}" == 0 ]; then
226
		  if (( ${mode} == 0 )); then
227
			if (( ${using_editor} == 0 )); then
231
				(
228
				(
232
					echo "Showing differences between ${ofile} and ${file}"
229
					echo "Showing differences between ${ofile} and ${file}"
233
					${showdiffcmd}
230
					${showdiffcmd}
Lines 242-247 Link Here
242
4) Show differences again
239
4) Show differences again
243
Please select from the menu above (-1 to ignore this update): "
240
Please select from the menu above (-1 to ignore this update): "
244
			read my_input
241
			read my_input
242
		  else
243
			${showdiffcmd} > ${TMP}/diff
244
			my_input=`dialog --title "${title}" --exit-label "Continue" --textbox ${TMP}/diff 0 0 --and-widget --no-shadow --begin $((size_y - 8)) $(((size_x - 30)/2)) --extra-button --extra-label "Diff" --cancel-label "Ignore" --menu "Use which Version?" 9 30 3 1 "Updated" 2 "Current" 3 "Combined" 2>&1 1>/dev/tty`
245
			retval=$?
246
			if (( retval == 1 )); then
247
				my_input=-1
248
			elif (( retval == 3 )); then
249
				my_input=4
250
			fi
251
		  fi
245
		fi
252
		fi
246
		
253
		
247
		case ${my_input} in
254
		case ${my_input} in
Lines 354-359 Link Here
354
declare -i mode=`get_config mode`
361
declare -i mode=`get_config mode`
355
[ -z ${mode} ] && mode=0
362
[ -z ${mode} ] && mode=0
356
[ -z "${pager}" ] && pager="cat"
363
[ -z "${pager}" ] && pager="cat"
364
if (( ${mode} == 1 )); then
365
	size="`dialog --print-maxsize 2>&1 1>/dev/tty`"
366
	size_x="${size#*, }"
367
	size_y="${size#* }"
368
	size_y="${size_y%,*}"
369
fi
357
370
358
#echo "rm_opts: $rm_opts, mv_opts: $mv_opts, cp_opts: $cp_opts"
371
#echo "rm_opts: $rm_opts, mv_opts: $mv_opts, cp_opts: $cp_opts"
359
#echo "pager: $pager, diff_command: $diff_command, merge_command: $merge_command" 
372
#echo "pager: $pager, diff_command: $diff_command, merge_command: $merge_command" 

Return to bug 23243