svn path=/main/branches/2.1.2/; revision=7637
my_input=$(read_int)
case ${my_input} in
1) echo "Replacing ${ofile} with ${mfile}"
- if [[ ${USERLAND} == GNU ]]; then
+ if [[ ${USERLAND:-GNU} == GNU ]]; then
+ chown --reference="${ofile}" "${mfile}"
chmod --reference="${ofile}" "${mfile}"
else
+ chown "$(stat -f %Su:%Sg "${ofile}")" "${mfile}"
chmod $(stat -f %Mp%Lp "${ofile}") "${mfile}"
fi
mv ${mv_opts} ${mfile} ${ofile}