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.
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
11 # branding_value.sh Chromium COPYRIGHT
12 # branding_value.sh Chromium PRODUCT_FULLNAME
17 if [ $# -ne 2 ] ; then
18 echo "error: expect two arguments, branding and key" >&2
25 pushd $
(dirname "${0}") > /dev
/null
31 case ${BUILD_BRANDING} in
33 BRANDING_FILE
="${TOP}/chrome/app/theme/chromium/BRANDING"
36 BRANDING_FILE
="${TOP}/chrome/app/theme/google_chrome/BRANDING"
39 echo "error: unknown branding: ${BUILD_BRANDING}" >&2
44 BRANDING_VALUE
=$
(sed -n -e "s/^${THE_KEY}=\(.*\)\$/\1/p" "${BRANDING_FILE}")
46 if [ -z "${BRANDING_VALUE}" ] ; then
47 echo "error: failed to find key '${THE_KEY}'" >&2
51 echo "${BRANDING_VALUE}"