Commit eea5a584 authored by Avi Drissman's avatar Avi Drissman Committed by Commit Bot

Remove 10.6 code from install.sh

We haven’t supported macOS 10.6 in years.

BUG=none

Change-Id: Ie19b16d0b2417f292b8c763ceeb412e73bdaa95f
Reviewed-on: https://chromium-review.googlesource.com/c/1342799Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609375}
parent d8b1a105
......@@ -98,12 +98,6 @@ chmod -R "${CHMOD_MODE}" "${DEST}" >& /dev/null
# permissions on any symbolic links.
find "${DEST}" -type l -exec chmod -h "${CHMOD_MODE}" {} + >& /dev/null
# Host OS version check, to be able to take advantage of features on newer
# systems and fall back to slow ways of doing things on older systems.
OS_VERSION=$(sw_vers -productVersion)
OS_MAJOR=$(sed -Ene 's/^([0-9]+).*/\1/p' <<< ${OS_VERSION})
OS_MINOR=$(sed -Ene 's/^([0-9]+)\.([0-9]+).*/\2/p' <<< ${OS_VERSION})
# Because this script is launched by the application itself, the installation
# process inherits the quarantine bit (LSFileQuarantineEnabled). Any files or
# directories created during the update will be quarantined in that case,
......@@ -113,14 +107,7 @@ OS_MINOR=$(sed -Ene 's/^([0-9]+)\.([0-9]+).*/\2/p' <<< ${OS_VERSION})
# it can be assumed that the installed copy should not be quarantined. Use
# xattr to drop the quarantine attribute.
QUARANTINE_ATTR=com.apple.quarantine
if [ ${OS_MAJOR} -gt 10 ] ||
([ ${OS_MAJOR} -eq 10 ] && [ ${OS_MINOR} -ge 6 ]) ; then
# On 10.6, xattr supports -r for recursive operation.
xattr -d -r "${QUARANTINE_ATTR}" "${DEST}" >& /dev/null
else
# On earlier systems, xattr doesn't support -r, so run xattr via find.
find "${DEST}" -exec xattr -d "${QUARANTINE_ATTR}" {} + >& /dev/null
fi
xattr -d -r "${QUARANTINE_ATTR}" "${DEST}" >& /dev/null
# Great success!
exit 0
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment