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

(-)bin/emerge-webrsync (-2 / +4 lines)
Lines 7-13 Link Here
7
7
8
eval $(/usr/lib/portage/bin/portageq envvar -v FEATURES FETCHCOMMAND \
8
eval $(/usr/lib/portage/bin/portageq envvar -v FEATURES FETCHCOMMAND \
9
	GENTOO_MIRRORS PORTAGE_INST_UID PORTAGE_INST_GID PORTAGE_NICENESS \
9
	GENTOO_MIRRORS PORTAGE_INST_UID PORTAGE_INST_GID PORTAGE_NICENESS \
10
	PORTAGE_TMPDIR PORTDIR USERLAND)
10
	PORTAGE_TMPDIR PORTDIR)
11
DISTDIR="${PORTAGE_TMPDIR}/emerge-webrsync"
11
DISTDIR="${PORTAGE_TMPDIR}/emerge-webrsync"
12
12
13
# If PORTAGE_NICENESS is overriden via the env then it will
13
# If PORTAGE_NICENESS is overriden via the env then it will
Lines 94-100 Link Here
94
	# snapshot (for attempts=1, subtract 1 day from the current UTC time).
94
	# snapshot (for attempts=1, subtract 1 day from the current UTC time).
95
	daysbefore=$(expr $(date -u +"%s") - 86400 \* ${attempts})
95
	daysbefore=$(expr $(date -u +"%s") - 86400 \* ${attempts})
96
	DATE_ARGS="-d @${daysbefore}"
96
	DATE_ARGS="-d @${daysbefore}"
97
	[ "${USERLAND}" != "GNU" ] && DATE_ARGS="-r ${daysbefore}"
97
	# ${USERLAND} is unreliable since the portage tree might be empty, so test
98
	# success of the -r option to distinguish between gnu and bsd date.
99
	date -r ${daysbefore} >&/dev/null && DATE_ARGS="-r ${daysbefore}"
98
	day=$(date ${DATE_ARGS} -u +"%d")
100
	day=$(date ${DATE_ARGS} -u +"%d")
99
	month=$(date ${DATE_ARGS} -u +"%m")
101
	month=$(date ${DATE_ARGS} -u +"%m")
100
	year=$(date ${DATE_ARGS} -u +"%Y")
102
	year=$(date ${DATE_ARGS} -u +"%Y")

Return to bug 164532