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 set -e | 7 set -e |
8 | 8 |
9 # Pull off the optional args | 9 # Pull off the optional args |
10 USE_BREAKPAD=0 | 10 USE_BREAKPAD=0 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 68 |
69 APP_NAME=$("${BRAND_SCRIPT}" "${BUILD_BRANDING}" PRODUCT_FULLNAME) | 69 APP_NAME=$("${BRAND_SCRIPT}" "${BUILD_BRANDING}" PRODUCT_FULLNAME) |
70 SRC_APP_PATH="${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}" | 70 SRC_APP_PATH="${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}" |
71 | 71 |
72 if [ "${USE_SVN}" = "1" ] ; then | 72 if [ "${USE_SVN}" = "1" ] ; then |
73 # Visible in the about:version page. | 73 # Visible in the about:version page. |
74 SVN_INFO=$(svn info "${TOP}" 2>/dev/null || true) | 74 SVN_INFO=$(svn info "${TOP}" 2>/dev/null || true) |
75 SVN_REVISION=$(echo "${SVN_INFO}" | sed -Ene 's/^Revision: (.*)$/\1/p') | 75 SVN_REVISION=$(echo "${SVN_INFO}" | sed -Ene 's/^Revision: (.*)$/\1/p') |
76 if [ -z "${SVN_REVISION}" ] ; then | 76 if [ -z "${SVN_REVISION}" ] ; then |
77 GIT_INFO=$(git log -1 --grep=git-svn-id --format=%b 2>/dev/null || true) | 77 GIT_INFO=$(git log -1 --grep=git-svn-id --format=%b 2>/dev/null || true) |
78 SVN_REVISION=$(echo "${GIT_INFO}" \ | 78 SVN_REVISION=$(echo "${GIT_INFO}" | \ |
79 | sed -Ene 's/^git-svn-id: .*@([0-9]+).*$/\1/p') | 79 sed -Ene 's/^git-svn-id: .*@([0-9]+).*$/\1/p') |
80 # Finding the revision for git and svn has failed. | 80 # Finding the revision for git and svn has failed. |
81 if [ -z "${SVN_REVISION}" ] ; then | 81 if [ -z "${SVN_REVISION}" ] ; then |
82 echo "Could not determine svn revision. This may be OK." >&2 | 82 echo "Could not determine svn revision. This may be OK." >&2 |
83 else | 83 else |
84 SVN_PATH=$(echo "${GIT_INFO}" \ | 84 SVN_PATH=$(echo "${GIT_INFO}" | \ |
85 | sed -Ene 's%^git-svn-id: .*/chrome/(.*)@.*$%/\1%p') | 85 sed -Ene 's%^git-svn-id: .*/chrome/(.*)@.*$%/\1%p') |
86 fi | 86 fi |
87 else | 87 else |
88 # Grab the path to the source root in the Subversion repository by taking | 88 # Grab the path to the source root in the Subversion repository by taking |
89 # the URL to the source root directory and the repository root, and | 89 # the URL to the source root directory and the repository root, and |
90 # removing the latter from the former. This ensures that SVN_PATH will | 90 # removing the latter from the former. This ensures that SVN_PATH will |
91 # contain a useful path regardless of the Subversion server, mirror, and | 91 # contain a useful path regardless of the Subversion server, mirror, and |
92 # authentication scheme in use. | 92 # authentication scheme in use. |
93 SVN_URL=$(echo "${SVN_INFO}" | sed -Ene 's/^URL: (.*)$/\1/p') | 93 SVN_URL=$(echo "${SVN_INFO}" | sed -Ene 's/^URL: (.*)$/\1/p') |
94 SVN_ROOT=$(echo "${SVN_INFO}" | sed -Ene 's/^Repository Root: (.*)$/\1/p') | 94 SVN_ROOT=$(echo "${SVN_INFO}" | sed -Ene 's/^Repository Root: (.*)$/\1/p') |
95 if [ -n "${SVN_ROOT}" ] && \ | 95 if [ -n "${SVN_ROOT}" ] && \ |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 fi | 190 fi |
191 | 191 |
192 # Info.plist will work perfectly well in any plist format, but traditionally | 192 # Info.plist will work perfectly well in any plist format, but traditionally |
193 # applications use xml1 for this, so convert it back after whatever defaults | 193 # applications use xml1 for this, so convert it back after whatever defaults |
194 # might have done. | 194 # might have done. |
195 plutil -convert xml1 "${TMP_INFO_PLIST}" | 195 plutil -convert xml1 "${TMP_INFO_PLIST}" |
196 cp "${TMP_INFO_PLIST}" "${SRC_APP_PATH}/${INFO_PLIST_PATH}" | 196 cp "${TMP_INFO_PLIST}" "${SRC_APP_PATH}/${INFO_PLIST_PATH}" |
197 | 197 |
198 # Clean up. | 198 # Clean up. |
199 rm -f "${TMP_INFO_PLIST}" | 199 rm -f "${TMP_INFO_PLIST}" |
OLD | NEW |