From: Zac Medico Date: Sat, 29 Dec 2007 19:54:20 +0000 (-0000) Subject: Fix USERLAND references to handle Darwin like BSD. X-Git-Tag: v2.2_pre1~81 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=69b4c507a0cb0059c4ff5da81c4bb49cde27131e;p=portage.git Fix USERLAND references to handle Darwin like BSD. svn path=/main/trunk/; revision=9117 --- diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync index 8ee18f2a4..4edf2bc36 100755 --- a/bin/emerge-webrsync +++ b/bin/emerge-webrsync @@ -50,7 +50,8 @@ get_date_part() { local utc_time_in_secs="$1" local part="$2" - if [ "${USERLAND}" = "BSD" ]; then + if [[ ${USERLAND} == BSD ]] || \ + [[ ${USERLAND} == Darwin ]] ; then date -r ${utc_time_in_secs} -u +"${part}" else date -d @${utc_time_in_secs} -u +"${part}" diff --git a/bin/etc-update b/bin/etc-update index e8ba989c5..c597a50be 100755 --- a/bin/etc-update +++ b/bin/etc-update @@ -401,12 +401,13 @@ Please select from the menu above (-1 to exit, losing this merge): " my_input=$(read_int) case ${my_input} in 1) echo "Replacing ${ofile} with ${mfile}" - if [[ ${USERLAND:-GNU} == GNU ]]; then - chown --reference="${ofile}" "${mfile}" - chmod --reference="${ofile}" "${mfile}" - else + if [[ ${USERLAND} == BSD ]] || \ + [[ ${USERLAND} == Darwin ]] ; then chown "$(stat -f %Su:%Sg "${ofile}")" "${mfile}" chmod $(stat -f %Mp%Lp "${ofile}") "${mfile}" + else + chown --reference="${ofile}" "${mfile}" + chmod --reference="${ofile}" "${mfile}" fi mv ${mv_opts} "${mfile}" "${ofile}" rm ${rm_opts} "${file}"