summaryrefslogtreecommitdiff
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 /bin/etc-update
parentFix broken Darwin USERLAND detection. (diff)
downloadportage-idfetch-69b4c507a0cb0059c4ff5da81c4bb49cde27131e.tar.gz
portage-idfetch-69b4c507a0cb0059c4ff5da81c4bb49cde27131e.tar.bz2
portage-idfetch-69b4c507a0cb0059c4ff5da81c4bb49cde27131e.zip
Fix USERLAND references to handle Darwin like BSD.
svn path=/main/trunk/; revision=9117
Diffstat (limited to 'bin/etc-update')
-rwxr-xr-xbin/etc-update9
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/etc-update b/bin/etc-update
index e8ba989c..c597a50b 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}"