OLD | NEW |
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 # --- BEGIN COMMON.SH BOILERPLATE --- | 10 # --- BEGIN COMMON.SH BOILERPLATE --- |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 fi | 64 fi |
65 | 65 |
66 unstable_suffix="9999" | 66 unstable_suffix="9999" |
67 workon_name="${1}-${unstable_suffix}" | 67 workon_name="${1}-${unstable_suffix}" |
68 pkgfile= | 68 pkgfile= |
69 workpath= | 69 workpath= |
70 | 70 |
71 if ! pkgfile=$("${EQUERYCMD}" which "${workon_name}" 2> /dev/null); then | 71 if ! pkgfile=$("${EQUERYCMD}" which "${workon_name}" 2> /dev/null); then |
72 if ACCEPT_KEYWORDS="~${BOARD_KEYWORD}" "${EQUERYCMD}" which "${workon_name}" \ | 72 if ACCEPT_KEYWORDS="~${BOARD_KEYWORD}" "${EQUERYCMD}" which "${workon_name}" \ |
73 > /dev/null 2>&1; then | 73 > /dev/null 2>&1; then |
74 die "run './cros_workon --board ${BOARD_STR} start ${1}' first!" 1>&2 | 74 die "run 'cros_workon --board ${BOARD_STR} start ${1}' first!" 1>&2 |
75 fi | 75 fi |
76 die "error looking up package $1" | 76 die "error looking up package $1" |
77 fi | 77 fi |
78 | 78 |
79 if [ "${FLAGS_scrub}" = "${FLAGS_TRUE}" ]; then | 79 if [ "${FLAGS_scrub}" = "${FLAGS_TRUE}" ]; then |
80 warn "--scrub will destroy ALL FILES unknown to git!" | 80 warn "--scrub will destroy ALL FILES unknown to git!" |
81 read -p "Are you sure you want to do this? [y|N]" resp | 81 read -p "Are you sure you want to do this? [y|N]" resp |
82 if egrep -qi "^y(es)?$" <(echo -n "${resp}"); then | 82 if egrep -qi "^y(es)?$" <(echo -n "${resp}"); then |
83 eval $(${EBUILDCMD} $(${EQUERYCMD} which ${workon_name}) info) | 83 eval $(${EBUILDCMD} $(${EQUERYCMD} which ${workon_name}) info) |
84 srcdir=$(readlink -m ${CROS_WORKON_SRCDIR}) | 84 srcdir=$(readlink -m ${CROS_WORKON_SRCDIR}) |
(...skipping 25 matching lines...) Expand all Loading... |
110 fi | 110 fi |
111 | 111 |
112 clean= | 112 clean= |
113 if [ "${FLAGS_reconf}" = "${FLAGS_TRUE}" ]; then | 113 if [ "${FLAGS_reconf}" = "${FLAGS_TRUE}" ]; then |
114 clean="clean" | 114 clean="clean" |
115 else | 115 else |
116 rm -f "/build/${BOARD_STR}/tmp/portage/${workpath}/.compiled" | 116 rm -f "/build/${BOARD_STR}/tmp/portage/${workpath}/.compiled" |
117 fi | 117 fi |
118 SANDBOX_WRITE=~/trunk CROS_WORKON_INPLACE=1 \ | 118 SANDBOX_WRITE=~/trunk CROS_WORKON_INPLACE=1 \ |
119 "${EBUILDCMD}" "${pkgfile}" ${clean} "${to_do}" | 119 "${EBUILDCMD}" "${pkgfile}" ${clean} "${to_do}" |
OLD | NEW |