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

Side by Side Diff: build/branding_value.sh

Issue 2101243005: Add a snapshot of flutter/engine/src/build to our sdk (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add README.dart Created 4 years, 5 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
« no previous file with comments | « build/apply_locales.py ('k') | build/build-ctags.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) 2008 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 is a wrapper for fetching values from the BRANDING files. Pass the
8 # value of GYP's branding variable followed by the key you want and the right
9 # file is checked.
10 #
11 # branding_value.sh Chromium COPYRIGHT
12 # branding_value.sh Chromium PRODUCT_FULLNAME
13 #
14
15 set -e
16
17 if [ $# -ne 2 ] ; then
18 echo "error: expect two arguments, branding and key" >&2
19 exit 1
20 fi
21
22 BUILD_BRANDING=$1
23 THE_KEY=$2
24
25 pushd $(dirname "${0}") > /dev/null
26 BUILD_DIR=$(pwd)
27 popd > /dev/null
28
29 TOP="${BUILD_DIR}/.."
30
31 case ${BUILD_BRANDING} in
32 Chromium)
33 BRANDING_FILE="${TOP}/chrome/app/theme/chromium/BRANDING"
34 ;;
35 Chrome)
36 BRANDING_FILE="${TOP}/chrome/app/theme/google_chrome/BRANDING"
37 ;;
38 *)
39 echo "error: unknown branding: ${BUILD_BRANDING}" >&2
40 exit 1
41 ;;
42 esac
43
44 BRANDING_VALUE=$(sed -n -e "s/^${THE_KEY}=\(.*\)\$/\1/p" "${BRANDING_FILE}")
45
46 if [ -z "${BRANDING_VALUE}" ] ; then
47 echo "error: failed to find key '${THE_KEY}'" >&2
48 exit 1
49 fi
50
51 echo "${BRANDING_VALUE}"
OLDNEW
« no previous file with comments | « build/apply_locales.py ('k') | build/build-ctags.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698