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

Side by Side Diff: common.sh

Issue 4425004: Adding a script to generate au-geneate.zip file Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: Created 10 years, 1 month 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 | « no previous file | generate_au_zip.py » ('j') | generate_au_zip.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # Common constants for build scripts 5 # Common constants for build scripts
6 # This must evaluate properly for both /bin/bash and /bin/sh 6 # This must evaluate properly for both /bin/bash and /bin/sh
7 7
8 # All scripts should die on error unless commands are specifically excepted 8 # All scripts should die on error unless commands are specifically excepted
9 # by prefixing with '!' or surrounded by 'set +e' / 'set -e'. 9 # by prefixing with '!' or surrounded by 'set +e' / 'set -e'.
10 # TODO: Re-enable this once shflags is less prone to dying. 10 # TODO: Re-enable this once shflags is less prone to dying.
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 DEFAULT_IMG_SUITE=${CHROMEOS_IMG_SUITE:-"karmic"} 97 DEFAULT_IMG_SUITE=${CHROMEOS_IMG_SUITE:-"karmic"}
98 98
99 # Default location for chroot 99 # Default location for chroot
100 DEFAULT_CHROOT_DIR=${CHROMEOS_CHROOT_DIR:-"$GCLIENT_ROOT/chroot"} 100 DEFAULT_CHROOT_DIR=${CHROMEOS_CHROOT_DIR:-"$GCLIENT_ROOT/chroot"}
101 101
102 # All output files from build should go under $DEFAULT_BUILD_ROOT, so that 102 # All output files from build should go under $DEFAULT_BUILD_ROOT, so that
103 # they don't pollute the source directory. 103 # they don't pollute the source directory.
104 DEFAULT_BUILD_ROOT=${CHROMEOS_BUILD_ROOT:-"$SRC_ROOT/build"} 104 DEFAULT_BUILD_ROOT=${CHROMEOS_BUILD_ROOT:-"$SRC_ROOT/build"}
105 105
106 # Set up a global ALL_BOARDS value 106 # Set up a global ALL_BOARDS value
107 ALL_BOARDS=$(cd $SRC_ROOT/overlays;ls -1d overlay-* 2>&-|sed 's,overlay-,,g') 107 if [ -d $SRC_ROOT/overlays ]; then
108 ALL_BOARDS=$(cd $SRC_ROOT/overlays;ls -1d overlay-* 2>&-|sed 's,overlay-,,g')
109 fi
108 # Strip CR 110 # Strip CR
109 ALL_BOARDS=$(echo $ALL_BOARDS) 111 ALL_BOARDS=$(echo $ALL_BOARDS)
110 # Set a default BOARD 112 # Set a default BOARD
111 #DEFAULT_BOARD=x86-generic # or... 113 #DEFAULT_BOARD=x86-generic # or...
112 DEFAULT_BOARD=$(echo $ALL_BOARDS | awk '{print $NF}') 114 DEFAULT_BOARD=$(echo $ALL_BOARDS | awk '{print $NF}')
113 115
114 # Enable --fast by default on non-official builds 116 # Enable --fast by default on non-official builds
115 DEFAULT_FAST="${FLAGS_TRUE}" 117 DEFAULT_FAST="${FLAGS_TRUE}"
116 if [ "${CHROMEOS_OFFICIAL:-0}" = "1" ]; then 118 if [ "${CHROMEOS_OFFICIAL:-0}" = "1" ]; then
117 DEFAULT_FAST="${FLAGS_FALSE}" 119 DEFAULT_FAST="${FLAGS_FALSE}"
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 chroot_hacks_from_outside() { 518 chroot_hacks_from_outside() {
517 # Give args better names. 519 # Give args better names.
518 local chroot_dir="${1}" 520 local chroot_dir="${1}"
519 521
520 # Add root as a sudoer if not already done. 522 # Add root as a sudoer if not already done.
521 if ! sudo grep -q '^root ALL=(ALL) ALL$' "${chroot_dir}/etc/sudoers" ; then 523 if ! sudo grep -q '^root ALL=(ALL) ALL$' "${chroot_dir}/etc/sudoers" ; then
522 info "Upgrading old chroot (pre 2010-10-19) - adding root to sudoers" 524 info "Upgrading old chroot (pre 2010-10-19) - adding root to sudoers"
523 sudo bash -c "echo root ALL=\(ALL\) ALL >> \"${chroot_dir}/etc/sudoers\"" 525 sudo bash -c "echo root ALL=\(ALL\) ALL >> \"${chroot_dir}/etc/sudoers\""
524 fi 526 fi
525 } 527 }
OLDNEW
« no previous file with comments | « no previous file | generate_au_zip.py » ('j') | generate_au_zip.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698