| 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: dmgdiffer.sh product_name old_dmg new_dmg patch_dmg | 7 # usage: dmgdiffer.sh product_name old_dmg new_dmg patch_dmg |
| 8 # | 8 # |
| 9 # dmgdiffer creates a disk image containing a binary update able to patch | 9 # dmgdiffer creates a disk image containing a binary update able to patch |
| 10 # a product originally distributed in old_dmg to the version in new_dmg. Much | 10 # a product originally distributed in old_dmg to the version in new_dmg. Much |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 | 236 |
| 237 local old_versioned_dir="${old_app_path}/${VERSIONS_DIR}/${old_app_version}" | 237 local old_versioned_dir="${old_app_path}/${VERSIONS_DIR}/${old_app_version}" |
| 238 local new_versioned_dir="${new_app_path}/${VERSIONS_DIR}/${new_app_version}" | 238 local new_versioned_dir="${new_app_path}/${VERSIONS_DIR}/${new_app_version}" |
| 239 | 239 |
| 240 if ! cp -p "${SCRIPT_DIR}/keystone_install.sh" \ | 240 if ! cp -p "${SCRIPT_DIR}/keystone_install.sh" \ |
| 241 "${patch_fs}/.keystone_install"; then | 241 "${patch_fs}/.keystone_install"; then |
| 242 err "could not copy .keystone_install" | 242 err "could not copy .keystone_install" |
| 243 exit 13 | 243 exit 13 |
| 244 fi | 244 fi |
| 245 | 245 |
| 246 local patch_keychain_reauthorize_dir="${patch_fs}/.keychain_reauthorize" | |
| 247 if ! mkdir "${patch_keychain_reauthorize_dir}"; then | |
| 248 err "could not mkdir patch_keychain_reauthorize_dir" | |
| 249 exit 13 | |
| 250 fi | |
| 251 | |
| 252 if ! cp -p "${SCRIPT_DIR}/.keychain_reauthorize/${old_app_bundleid}" \ | |
| 253 "${patch_keychain_reauthorize_dir}/${old_app_bundleid}"; then | |
| 254 err "could not copy keychain_reauthorize" | |
| 255 exit 13 | |
| 256 fi | |
| 257 | |
| 258 local patch_dotpatch_dir="${patch_fs}/.patch" | 246 local patch_dotpatch_dir="${patch_fs}/.patch" |
| 259 if ! mkdir "${patch_dotpatch_dir}"; then | 247 if ! mkdir "${patch_dotpatch_dir}"; then |
| 260 err "could not mkdir patch_dotpatch_dir" | 248 err "could not mkdir patch_dotpatch_dir" |
| 261 exit 13 | 249 exit 13 |
| 262 fi | 250 fi |
| 263 | 251 |
| 264 if ! cp -p "${SCRIPT_DIR}/dirpatcher.sh" \ | 252 if ! cp -p "${SCRIPT_DIR}/dirpatcher.sh" \ |
| 265 "${SCRIPT_DIR}/goobspatch" \ | 253 "${SCRIPT_DIR}/goobspatch" \ |
| 266 "${SCRIPT_DIR}/liblzma_decompress.dylib" \ | 254 "${SCRIPT_DIR}/liblzma_decompress.dylib" \ |
| 267 "${SCRIPT_DIR}/xzdec" \ | 255 "${SCRIPT_DIR}/xzdec" \ |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 trap - EXIT | 458 trap - EXIT |
| 471 } | 459 } |
| 472 | 460 |
| 473 if [[ ${#} -ne 4 ]]; then | 461 if [[ ${#} -ne 4 ]]; then |
| 474 usage | 462 usage |
| 475 exit 2 | 463 exit 2 |
| 476 fi | 464 fi |
| 477 | 465 |
| 478 main "${@}" | 466 main "${@}" |
| 479 exit ${?} | 467 exit ${?} |
| OLD | NEW |