OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
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 # Normally you don't want to build a dmg out of a debug build. | 7 # Normally you don't want to build a dmg out of a debug build. |
8 if [ "${CONFIGURATION}" != "Release" ] ; then | 8 if [ "${CONFIGURATION}" != "Release" ] ; then |
9 echo "warning: building dmg in non-release mode" >&2 | 9 echo "warning: building dmg in non-release mode" >&2 |
10 fi | 10 fi |
11 | 11 |
12 # Make sure we got the branding passed to us | 12 # Make sure we got the branding passed to us |
13 if [ $# -ne 1 ]; then | 13 if [ $# -ne 1 ]; then |
14 echo "error: missing branding as an argument" >&2 | 14 echo "error: missing branding as an argument" >&2 |
15 exit 1 | 15 exit 1 |
16 fi | 16 fi |
17 | 17 |
18 # fail on anything from here out | 18 # fail on anything from here out |
19 set -e | 19 set -e |
20 | 20 |
21 TOP="${SRCROOT}/.." | 21 TOP="${SRCROOT}/.." |
22 PKG_DMG="${TOP}/build/mac/pkg-dmg" | 22 PKG_DMG="${SRCROOT}/tools/build/mac/pkg-dmg" |
23 BRAND_SCRIPT="${TOP}/build/branding_value.sh" | 23 BRAND_SCRIPT="${TOP}/build/branding_value.sh" |
24 | 24 |
25 BUILD_BRANDING=$1 | 25 BUILD_BRANDING=$1 |
26 | 26 |
27 # show things as we run them | 27 # show things as we run them |
28 set -x | 28 set -x |
29 | 29 |
30 APP_NAME=$("${BRAND_SCRIPT}" "${BUILD_BRANDING}" PRODUCT_FULLNAME) | 30 APP_NAME=$("${BRAND_SCRIPT}" "${BUILD_BRANDING}" PRODUCT_FULLNAME) |
31 DMG_NAME=$(echo "${APP_NAME}" | sed "s/ //g") | 31 DMG_NAME=$(echo "${APP_NAME}" | sed "s/ //g") |
32 | 32 |
33 SRC_APP_PATH="${BUILT_PRODUCTS_DIR}/${APP_NAME}.app" | 33 SRC_APP_PATH="${BUILT_PRODUCTS_DIR}/${APP_NAME}.app" |
34 VOL_NAME="${APP_NAME}" | 34 VOL_NAME="${APP_NAME}" |
35 DST_DMG_PATH="${BUILT_PRODUCTS_DIR}/${DMG_NAME}" | 35 DST_DMG_PATH="${BUILT_PRODUCTS_DIR}/${DMG_NAME}" |
36 | 36 |
37 # Call the real working | 37 # Call the real working |
38 "${PKG_DMG}" --source /var/empty \ | 38 "${PKG_DMG}" --source /var/empty \ |
39 --target "${DST_DMG_PATH}" \ | 39 --target "${DST_DMG_PATH}" \ |
40 --format UDBZ \ | 40 --format UDBZ \ |
41 --volname "${VOL_NAME}" \ | 41 --volname "${VOL_NAME}" \ |
42 --tempdir "${TEMP_DIR}" \ | 42 --tempdir "${TEMP_DIR}" \ |
43 --copy "${SRC_APP_PATH}/:/${APP_NAME}.app/" | 43 --copy "${SRC_APP_PATH}/:/${APP_NAME}.app/" |
OLD | NEW |