Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/bin/sh | 1 #!/bin/sh |
|
Mark Mentovai
2009/05/18 20:41:09
This file is fine too.
| |
| 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 # Make sure we got the header to write into passed to us | 7 # Make sure we got the header to write into passed to us |
| 8 if [ $# -ne 1 ]; then | 8 if [ $# -ne 1 ]; then |
| 9 echo "error: missing branding as an argument" >&2 | 9 echo "error: missing branding as an argument" >&2 |
| 10 exit 1 | 10 exit 1 |
| 11 fi | 11 fi |
| 12 | 12 |
| 13 set -ex | 13 set -ex |
| 14 | 14 |
| 15 # Skip out if we're aren't in Release mode, no need for dump_syms on debug runs. | 15 # Skip out if we're aren't in Release mode, no need for dump_syms on debug runs. |
| 16 if [ "${CONFIGURATION}" != "Release" ] ; then | 16 if [ "${CONFIGURATION}" != "Release" ] ; then |
| 17 exit 0 | 17 exit 0 |
| 18 fi | 18 fi |
| 19 | 19 |
| 20 TOP="${SRCROOT}/.." | 20 TOP="${SRCROOT}/.." |
| 21 BUILD_BRANDING=$1 | 21 BUILD_BRANDING=$1 |
| 22 if [ "${BUILD_BRANDING}" == "Chromium" ]; then | |
| 23 SRC_APP_NAME="Chromium" | |
| 24 elif [ "${BUILD_BRANDING}" == "Chrome" ]; then | |
| 25 SRC_APP_NAME="Google Chrome" | |
| 26 else | |
| 27 echo "error: unknown branding: ${BUILD_BRANDING}" >&2 | |
| 28 exit 1 | |
| 29 fi | |
| 22 | 30 |
| 23 . "${TOP}/chrome/VERSION" | 31 . "${TOP}/chrome/VERSION" |
| 24 | 32 |
| 25 SRC_APP_NAME="${BUILD_BRANDING}" | |
| 26 BREAKPAD_DUMP_SYMS="${BUILT_PRODUCTS_DIR}/dump_syms" | 33 BREAKPAD_DUMP_SYMS="${BUILT_PRODUCTS_DIR}/dump_syms" |
| 27 BREAKPAD_PRODUCT_ID="${BUILD_BRANDING}_Mac" | 34 BREAKPAD_PRODUCT_ID="${BUILD_BRANDING}_Mac" |
| 28 FULL_VERSION="${MAJOR}.${MINOR}.${BUILD}.${PATCH}" | 35 FULL_VERSION="${MAJOR}.${MINOR}.${BUILD}.${PATCH}" |
| 29 SRC_APP_PATH="${BUILT_PRODUCTS_DIR}/${SRC_APP_NAME}.app" | 36 SRC_APP_PATH="${BUILT_PRODUCTS_DIR}/${SRC_APP_NAME}.app" |
| 30 # Created by the build/mac/strip_from_xcode script. | 37 # Created by the build/mac/strip_from_xcode script. |
| 31 UNSTRIPPED_APP="${SRC_APP_PATH}.dSYM/Contents/Resources/DWARF/${SRC_APP_NAME}" | 38 UNSTRIPPED_APP="${SRC_APP_PATH}.dSYM/Contents/Resources/DWARF/${SRC_APP_NAME}" |
| 32 SYMBOL_FILE="${BUILT_PRODUCTS_DIR}/${BUILD_BRANDING}-${FULL_VERSION} i386.breakp ad" | 39 SYMBOL_FILE="${BUILT_PRODUCTS_DIR}/${BUILD_BRANDING}-${FULL_VERSION} i386.breakp ad" |
| 33 | 40 |
| 34 # Only run dump_syms if the file has changed since we last did a dump. | 41 # Only run dump_syms if the file has changed since we last did a dump. |
| 35 if [ "${UNSTRIPPED_APP}" -nt "${SYMBOL_FILE}" ] ; then | 42 if [ "${UNSTRIPPED_APP}" -nt "${SYMBOL_FILE}" ] ; then |
| 36 "${BREAKPAD_DUMP_SYMS}" -a i386 "${UNSTRIPPED_APP}" > "${SYMBOL_FILE}" | 43 "${BREAKPAD_DUMP_SYMS}" -a i386 "${UNSTRIPPED_APP}" > "${SYMBOL_FILE}" |
| 37 fi | 44 fi |
| OLD | NEW |