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

Collapse All | Expand All

(-)a/functions.sh (-9 / +24 lines)
Lines 376-391 get_bootparam() Link Here
376
#   EXAMPLE: if is_older_than a.out *.o ; then ...
376
#   EXAMPLE: if is_older_than a.out *.o ; then ...
377
is_older_than()
377
is_older_than()
378
{
378
{
379
	local x=
379
	local ref has_gfind
380
	local ref="$1"
381
	[ $# -eq 0 ] || shift
382
380
383
	for x in "$@" ; do
381
	if [ -e "$1" ]; then
384
		[ "${x}" -nt "${ref}" ] && return 0
382
		ref=$1
385
		[ -d "${x}" ] && is_older_than "${ref}" "${x}"/* && return 0
383
	else
386
	done
384
		ref=
385
	fi
386
	shift
387
387
388
	return 1
388
	# Consult the hash table in the present shell, prior to forking.
389
	hash gfind 2>/dev/null; has_gfind=$(( $? == 0 ))
390
391
	for path; do
392
		if [ -e "${path}" ]; then
393
			printf '%s\0' "${path}"
394
		fi
395
	done |
396
	{
397
		set -- -L -files0-from - ${ref:+-newermm} ${ref:+"${ref}"} -printf '\n' -quit
398
		if [ "${has_gfind}" -eq 1 ]; then
399
			gfind "$@"
400
		else
401
			find "$@"
402
		fi
403
	} |
404
	read -r line
389
}
405
}
390
406
391
# This is the main script, please add all functions above this point!
407
# This is the main script, please add all functions above this point!
392
- 

Return to bug 579688