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

Side by Side Diff: bin/cros_workon_make

Issue 6240018: This starts to fix the scripts so that they load from /usr/lib/crosutils (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: fixing bad merge Created 9 years, 10 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 | « bin/cros_update_image.sh ('k') | bootperf-bin/bootperf » ('j') | 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) 2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2010 The Chromium OS 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 # Simple wrapper script to build a cros_workon package incrementally. 7 # Simple wrapper script to build a cros_workon package incrementally.
8 # You must already be cros_workon'ing the package in question. 8 # You must already be cros_workon'ing the package in question.
9 9
10 . "$(dirname $0)/../common.sh" 10 # --- BEGIN COMMON.SH BOILERPLATE ---
11 # Load common CrOS utilities. Inside the chroot this file is installed in
12 # /usr/lib/crosutils. Outside the chroot we find it relative to the script's
13 # location.
14 find_common_sh() {
15 local common_paths=(/usr/lib/crosutils "$(dirname "$(readlink -f "$0")")/..")
16 local path
17
18 SCRIPT_ROOT=
19 for path in "${common_paths[@]}"; do
20 if [ -r "${path}/common.sh" ]; then
21 SCRIPT_ROOT=${path}
22 break
23 fi
24 done
25 }
26
27 find_common_sh
28 . "${SCRIPT_ROOT}/common.sh" || (echo "Unable to load common.sh" && exit 1)
29 # --- END COMMON.SH BOILERPLATE ---
11 30
12 # Script must be run inside the chroot. 31 # Script must be run inside the chroot.
13 restart_in_chroot_if_needed "$@" 32 restart_in_chroot_if_needed "$@"
14 33
15 get_default_board 34 get_default_board
16 35
17 DEFINE_string board "${DEFAULT_BOARD}" \ 36 DEFINE_string board "${DEFAULT_BOARD}" \
18 "Board for which to build the package." 37 "Board for which to build the package."
19 DEFINE_boolean test "${FLAGS_FALSE}" \ 38 DEFINE_boolean test "${FLAGS_FALSE}" \
20 "Compile and run tests as well." 39 "Compile and run tests as well."
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 fi 110 fi
92 111
93 clean= 112 clean=
94 if [ "${FLAGS_reconf}" = "${FLAGS_TRUE}" ]; then 113 if [ "${FLAGS_reconf}" = "${FLAGS_TRUE}" ]; then
95 clean="clean" 114 clean="clean"
96 else 115 else
97 rm -f "/build/${BOARD_STR}/tmp/portage/${workpath}/.compiled" 116 rm -f "/build/${BOARD_STR}/tmp/portage/${workpath}/.compiled"
98 fi 117 fi
99 SANDBOX_WRITE=~/trunk CROS_WORKON_INPLACE=1 \ 118 SANDBOX_WRITE=~/trunk CROS_WORKON_INPLACE=1 \
100 "${EBUILDCMD}" "${pkgfile}" ${clean} "${to_do}" 119 "${EBUILDCMD}" "${pkgfile}" ${clean} "${to_do}"
OLDNEW
« no previous file with comments | « bin/cros_update_image.sh ('k') | bootperf-bin/bootperf » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698