| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 | 2 |
| 3 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2009 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 # Called by the Keystone system to update the installed application with a new | 7 # Called by the Keystone system to update the installed application with a new |
| 8 # version from a disk image. | 8 # version from a disk image. |
| 9 | 9 |
| 10 # Return values: | 10 # Return values: |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 # admin-writeability is not a concern. | 281 # admin-writeability is not a concern. |
| 282 # | 282 # |
| 283 # If the application is not installed under /Applications, it might not be in | 283 # If the application is not installed under /Applications, it might not be in |
| 284 # a system-wide location, and it probably won't be something that other users | 284 # a system-wide location, and it probably won't be something that other users |
| 285 # are running, so err on the side of safety and don't make it group-writeable. | 285 # are running, so err on the side of safety and don't make it group-writeable. |
| 286 # | 286 # |
| 287 # If this script is running as a user that is not a member of the admin group, | 287 # If this script is running as a user that is not a member of the admin group, |
| 288 # this operation will not succeed. Tolerate that case, because it's better | 288 # this operation will not succeed. Tolerate that case, because it's better |
| 289 # than the alternative, which is to make the application world-writeable. | 289 # than the alternative, which is to make the application world-writeable. |
| 290 if [ ${EUID} -ne 0 ] && [ "${DEST:0:14}" = "/Applications/" ] ; then | 290 if [ ${EUID} -ne 0 ] && [ "${DEST:0:14}" = "/Applications/" ] ; then |
| 291 (chgrp -Rfh admin "${DEST}" && chmod -Rfh g+w "${DEST}") >& /dev/null | 291 (chgrp -Rfh admin "${DEST}" && chmod -Rf g+w "${DEST}") >& /dev/null |
| 292 fi | 292 fi |
| 293 | 293 |
| 294 # Great success! | 294 # Great success! |
| 295 exit 0 | 295 exit 0 |
| OLD | NEW |