diff options
Diffstat (limited to 'chrome/app/clean_mac_resources')
-rwxr-xr-x | chrome/app/clean_mac_resources | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/chrome/app/clean_mac_resources b/chrome/app/clean_mac_resources new file mode 100755 index 0000000..36aefca --- /dev/null +++ b/chrome/app/clean_mac_resources @@ -0,0 +1,32 @@ +#!/bin/sh + +# Copyright (c) 2009 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +set -e + +# Resources used to live in the .app bundle's Resources directory, but now, +# almost all of them have moved into the .framework. To avoid having the old +# resources get in the way of non-clobber builds, this script removes them. + +# TODO(mark): Remove this some time after October 20, 2009, allowing two weeks +# for the transition. + +RESOURCES_DIR="${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Resources" + +# app.icns and document.icns are referenced by the app's Info.plist and must +# remain in the .app bundle. chrome_debug.log is created by debug builds, +# there's no reason to remove it if present. +find "${RESOURCES_DIR}" -type f -depth 1 \ + \! -name app.icns \! -name document.icns \! -name chrome_debug.log \ + -exec rm -f {} \; + +# Get rid of the locale.pak files in each .lproj directory. The .lprojs +# themselves must stay, because they still hold InfoPlist.strings files with +# localized strings for things like the Finder's Get Info window. +find "${RESOURCES_DIR}" -type f -depth 2 -name locale.pak -exec rm -f {} \; + +# Get rid of the Breakpad helpers (Breakpad-enabled builds only). +rm -rf "${RESOURCES_DIR}/crash_report_sender.app" \ + "${RESOURCES_DIR}/crash_inspector" |