Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Side by Side Diff: chrome/installer/mac/make_sign_sh

Issue 2749014: Split sign.sh into two pieces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_installer.gypi ('k') | chrome/installer/mac/make_signers.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/bin/sh
2
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
5 # found in the LICENSE file.
6
7 # This script creates sign.sh, the script that will be used to sign the
8 # application bundle and inner bundles. It also creates auxiliary files that
9 # sign.sh needs to do its job, such as the custom resource rules used to sign
10 # the outermost application bundle. These files are placed in the Packaging
11 # directory next to the .app bundle. The packaging system is expected to run
12 # sign.sh to sign everything.
13
14 set -e
15
16 if [ $# -ne 3 ] ; then
17 echo "usage: ${0} PACKAGING_DIR MAC_PRODUCT_NAME VERSION" >& 2
18 exit 1
19 fi
20
21 PACKAGING_DIR="${1}"
22 MAC_PRODUCT_NAME="${2}"
23 VERSION="${3}"
24
25 INPUT_DIR="$(dirname "${0}")"
26 SIGN_SH_IN_FILE="${INPUT_DIR}/sign.sh.in"
27 SIGN_SH_FILE="${PACKAGING_DIR}/sign.sh"
28 BROWSER_APP_RULES_IN_FILE="${INPUT_DIR}/app_resource_rules.plist.in"
29 BROWSER_APP_RULES_FILE="${PACKAGING_DIR}/app_resource_rules.plist"
30
31 # Double-backslash each dot: one backslash belongs in the regular expression,
32 # and the other backslash tells sed not to treat the first backslash
33 # specially.
34 VERSION_REGEX="$(echo "${VERSION}" | sed -e 's/\./\\\\./g')"
35
36 mkdir -p "${PACKAGING_DIR}"
37 sed -e "s/@MAC_PRODUCT_NAME@/${MAC_PRODUCT_NAME}/g" \
38 -e "s/@VERSION@/${VERSION}/g" \
39 -e "s/@VERSION_REGEX@/${VERSION_REGEX}/g" \
40 < "${SIGN_SH_IN_FILE}" \
41 > "${SIGN_SH_FILE}"
42 chmod +x "${SIGN_SH_FILE}"
43
44 sed -e "s/@MAC_PRODUCT_NAME@/${MAC_PRODUCT_NAME}/g" \
45 -e "s/@VERSION@/${VERSION}/g" \
46 -e "s/@VERSION_REGEX@/${VERSION_REGEX}/g" \
47 < "${BROWSER_APP_RULES_IN_FILE}" \
48 > "${BROWSER_APP_RULES_FILE}"
OLDNEW
« no previous file with comments | « chrome/chrome_installer.gypi ('k') | chrome/installer/mac/make_signers.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698