OLD | NEW |
1 #!/bin/bash -p | 1 #!/bin/bash -p |
2 | 2 |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # usage: keystone_install.sh update_dmg_mount_point | 7 # usage: keystone_install.sh update_dmg_mount_point |
8 # | 8 # |
9 # Called by the Keystone system to update the installed application with a new | 9 # Called by the Keystone system to update the installed application with a new |
10 # version from a disk image. | 10 # version from a disk image. |
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1068 # lsregister's exit codes shouldn't be confused with this script's own. | 1068 # lsregister's exit codes shouldn't be confused with this script's own. |
1069 # Redirect stdout to /dev/null to suppress the useless "ThrottleProcessIO: | 1069 # Redirect stdout to /dev/null to suppress the useless "ThrottleProcessIO: |
1070 # throttling disk i/o" messages that lsregister might print. | 1070 # throttling disk i/o" messages that lsregister might print. |
1071 note "notifying LaunchServices" | 1071 note "notifying LaunchServices" |
1072 local cs_fwk="/System/Library/Frameworks/CoreServices.framework" | 1072 local cs_fwk="/System/Library/Frameworks/CoreServices.framework" |
1073 local ls_fwk="${cs_fwk}/Frameworks/LaunchServices.framework" | 1073 local ls_fwk="${cs_fwk}/Frameworks/LaunchServices.framework" |
1074 local lsregister="${ls_fwk}/Support/lsregister" | 1074 local lsregister="${ls_fwk}/Support/lsregister" |
1075 note "cs_fwk = ${cs_fwk}" | 1075 note "cs_fwk = ${cs_fwk}" |
1076 note "ls_fwk = ${ls_fwk}" | 1076 note "ls_fwk = ${ls_fwk}" |
1077 note "lsregister = ${lsregister}" | 1077 note "lsregister = ${lsregister}" |
1078 "${lsregister}" "${installed_app}" > /dev/null || true | 1078 "${lsregister}" -f "${installed_app}" > /dev/null || true |
1079 | 1079 |
1080 # The brand information is stored differently depending on whether this is | 1080 # The brand information is stored differently depending on whether this is |
1081 # running for a system or user ticket. | 1081 # running for a system or user ticket. |
1082 note "handling brand code" | 1082 note "handling brand code" |
1083 | 1083 |
1084 local set_brand_file_access= | 1084 local set_brand_file_access= |
1085 local brand_plist | 1085 local brand_plist |
1086 if [[ -n "${system_ticket}" ]]; then | 1086 if [[ -n "${system_ticket}" ]]; then |
1087 # System ticket. | 1087 # System ticket. |
1088 set_brand_file_access="y" | 1088 set_brand_file_access="y" |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1405 | 1405 |
1406 # Check "less than" instead of "not equal to" in case Keystone ever changes to | 1406 # Check "less than" instead of "not equal to" in case Keystone ever changes to |
1407 # pass more arguments. | 1407 # pass more arguments. |
1408 if [[ ${#} -lt 1 ]]; then | 1408 if [[ ${#} -lt 1 ]]; then |
1409 usage | 1409 usage |
1410 exit 2 | 1410 exit 2 |
1411 fi | 1411 fi |
1412 | 1412 |
1413 main "${@}" | 1413 main "${@}" |
1414 exit ${?} | 1414 exit ${?} |
OLD | NEW |