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

Side by Side Diff: chrome/installer/linux/rpm/build.sh

Issue 1321573006: Remove env var dep from linux packaging. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes Created 5 years, 3 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 | « chrome/installer/linux/debian/build.sh ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 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 # TODO(mmoss) This currently only works with official builds, since non-official 7 # TODO(mmoss) This currently only works with official builds, since non-official
8 # builds don't add the "${BUILDDIR}/installer/" files needed for packaging. 8 # builds don't add the "${BUILDDIR}/installer/" files needed for packaging.
9 9
10 set -e 10 set -e
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 } 162 }
163 163
164 # Remove temporary files and unwanted packaging output. 164 # Remove temporary files and unwanted packaging output.
165 cleanup() { 165 cleanup() {
166 rm -rf "${STAGEDIR}" 166 rm -rf "${STAGEDIR}"
167 rm -rf "${TMPFILEDIR}" 167 rm -rf "${TMPFILEDIR}"
168 } 168 }
169 169
170 usage() { 170 usage() {
171 echo "usage: $(basename $0) [-c channel] [-a target_arch] [-o 'dir']" 171 echo "usage: $(basename $0) [-c channel] [-a target_arch] [-o 'dir']"
172 echo " [-b 'dir']" 172 echo " [-b 'dir'] -d branding"
173 echo "-c channel the package channel (trunk, asan, unstable, beta, stable)" 173 echo "-c channel the package channel (trunk, asan, unstable, beta, stable)"
174 echo "-a arch package architecture (ia32 or x64)" 174 echo "-a arch package architecture (ia32 or x64)"
175 echo "-o dir package output directory [${OUTPUTDIR}]" 175 echo "-o dir package output directory [${OUTPUTDIR}]"
176 echo "-b dir build input directory [${BUILDDIR}]" 176 echo "-b dir build input directory [${BUILDDIR}]"
177 echo "-d brand either chromium or google_chrome"
177 echo "-h this help message" 178 echo "-h this help message"
178 } 179 }
179 180
180 # Check that the channel name is one of the allowable ones. 181 # Check that the channel name is one of the allowable ones.
181 verify_channel() { 182 verify_channel() {
182 case $CHANNEL in 183 case $CHANNEL in
183 stable ) 184 stable )
184 CHANNEL=stable 185 CHANNEL=stable
185 # TODO(phajdan.jr): Remove REPLACES completely. 186 # TODO(phajdan.jr): Remove REPLACES completely.
186 REPLACES="dummy" 187 REPLACES="dummy"
(...skipping 20 matching lines...) Expand all
207 * ) 208 * )
208 echo 209 echo
209 echo "ERROR: '$CHANNEL' is not a valid channel type." 210 echo "ERROR: '$CHANNEL' is not a valid channel type."
210 echo 211 echo
211 exit 1 212 exit 1
212 ;; 213 ;;
213 esac 214 esac
214 } 215 }
215 216
216 process_opts() { 217 process_opts() {
217 while getopts ":o:b:c:a:h" OPTNAME 218 while getopts ":o:b:c:a:d:h" OPTNAME
218 do 219 do
219 case $OPTNAME in 220 case $OPTNAME in
220 o ) 221 o )
221 OUTPUTDIR=$(readlink -f "${OPTARG}") 222 OUTPUTDIR=$(readlink -f "${OPTARG}")
222 mkdir -p "${OUTPUTDIR}" 223 mkdir -p "${OUTPUTDIR}"
223 ;; 224 ;;
224 b ) 225 b )
225 BUILDDIR=$(readlink -f "${OPTARG}") 226 BUILDDIR=$(readlink -f "${OPTARG}")
226 ;; 227 ;;
227 c ) 228 c )
228 CHANNEL="$OPTARG" 229 CHANNEL="$OPTARG"
229 verify_channel 230 verify_channel
230 ;; 231 ;;
231 a ) 232 a )
232 TARGETARCH="$OPTARG" 233 TARGETARCH="$OPTARG"
233 ;; 234 ;;
235 d )
236 BRANDING="$OPTARG"
237 ;;
234 h ) 238 h )
235 usage 239 usage
236 exit 0 240 exit 0
237 ;; 241 ;;
238 \: ) 242 \: )
239 echo "'-$OPTARG' needs an argument." 243 echo "'-$OPTARG' needs an argument."
240 usage 244 usage
241 exit 1 245 exit 1
242 ;; 246 ;;
243 * ) 247 * )
(...skipping 24 matching lines...) Expand all
268 272
269 # call cleanup() on exit 273 # call cleanup() on exit
270 trap cleanup 0 274 trap cleanup 0
271 process_opts "$@" 275 process_opts "$@"
272 BUILDDIR=${BUILDDIR:=$(readlink -f "${SCRIPTDIR}/../../../../out/Release")} 276 BUILDDIR=${BUILDDIR:=$(readlink -f "${SCRIPTDIR}/../../../../out/Release")}
273 277
274 source ${BUILDDIR}/installer/common/installer.include 278 source ${BUILDDIR}/installer/common/installer.include
275 279
276 get_version_info 280 get_version_info
277 281
278 if [ "$CHROMIUM_BUILD" = "_google_chrome" ]; then 282 if [ "$BRANDING" = "google_chrome" ]; then
279 source "${BUILDDIR}/installer/common/google-chrome.info" 283 source "${BUILDDIR}/installer/common/google-chrome.info"
280 else 284 else
281 source "${BUILDDIR}/installer/common/chromium-browser.info" 285 source "${BUILDDIR}/installer/common/chromium-browser.info"
282 fi 286 fi
283 eval $(sed -e "s/^\([^=]\+\)=\(.*\)$/export \1='\2'/" \ 287 eval $(sed -e "s/^\([^=]\+\)=\(.*\)$/export \1='\2'/" \
284 "${BUILDDIR}/installer/theme/BRANDING") 288 "${BUILDDIR}/installer/theme/BRANDING")
285 289
286 REPOCONFIG="http://dl.google.com/linux/${PACKAGE#google-}/rpm/stable" 290 REPOCONFIG="http://dl.google.com/linux/${PACKAGE#google-}/rpm/stable"
287 SSLREPOCONFIG="https://dl.google.com/linux/${PACKAGE#google-}/rpm/stable" 291 SSLREPOCONFIG="https://dl.google.com/linux/${PACKAGE#google-}/rpm/stable"
288 verify_channel 292 verify_channel
(...skipping 13 matching lines...) Expand all
302 ;; 306 ;;
303 * ) 307 * )
304 echo 308 echo
305 echo "ERROR: Don't know how to build RPMs for '$TARGETARCH'." 309 echo "ERROR: Don't know how to build RPMs for '$TARGETARCH'."
306 echo 310 echo
307 exit 1 311 exit 1
308 ;; 312 ;;
309 esac 313 esac
310 314
311 do_package 315 do_package
OLDNEW
« no previous file with comments | « chrome/installer/linux/debian/build.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698