Rely on USERLAND since it's automatically generated by
authorZac Medico <zmedico@gentoo.org>
Sat, 29 Dec 2007 13:50:58 +0000 (13:50 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 29 Dec 2007 13:50:58 +0000 (13:50 -0000)
isolated-functions.sh when necessary.

svn path=/main/trunk/; revision=9107

bin/emerge-webrsync

index a3c7e9130153cf75190fe7e60286e32a271f4061..8ee18f2a4789147ec9949baca33f2aefb46a4c41 100755 (executable)
@@ -30,10 +30,6 @@ fi
 
 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
 
-# ${USERLAND} is unreliable since the portage tree might be empty, so test
-# success of the -r option to distinguish between gnu and bsd date.
-date -r 0 >&/dev/null && DATE_ARGS="BSD" || DATE_ARGS="GNU"
-
 do_verbose=0
 
 if hasq webrsync-gpg ${FEATURES} ; then
@@ -54,7 +50,7 @@ get_date_part() {
        local utc_time_in_secs="$1"
        local part="$2"
 
-       if [ "${DATE_ARGS}" = "BSD" ]; then
+       if [ "${USERLAND}" = "BSD" ]; then
                date -r ${utc_time_in_secs} -u +"${part}"
        else
                date -d @${utc_time_in_secs} -u +"${part}"