summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-12-29 19:54:20 +0000
committerZac Medico <zmedico@gentoo.org>2007-12-29 19:54:20 +0000
commit69b4c507a0cb0059c4ff5da81c4bb49cde27131e (patch)
tree51286f28c8355c53c3b200bf179114a98164549a
parent6336ea3ccaf12f14384f8d4d04602ec088ef7bf1 (diff)
downloadportage-69b4c507a0cb0059c4ff5da81c4bb49cde27131e.tar.gz
portage-69b4c507a0cb0059c4ff5da81c4bb49cde27131e.tar.bz2
portage-69b4c507a0cb0059c4ff5da81c4bb49cde27131e.zip
Fix USERLAND references to handle Darwin like BSD.
svn path=/main/trunk/; revision=9117
-rwxr-xr-xbin/emerge-webrsync3
-rwxr-xr-xbin/etc-update9
2 files changed, 7 insertions, 5 deletions
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}"