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

Unified Diff: bin/cros_workon_make

Issue 6748008: cros_workon_make: deprecate (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Fix. Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/cros_workon_make
diff --git a/bin/cros_workon_make b/bin/cros_workon_make
index a0599f0402e0cb9e234cc1fedf64d37cd7e90472..639183035c6015ed125a1f6b2e8f76a07928fd01 100755
--- a/bin/cros_workon_make
+++ b/bin/cros_workon_make
@@ -28,92 +28,4 @@ find_common_sh
. "${SCRIPT_ROOT}/common.sh" || (echo "Unable to load common.sh" && exit 1)
# --- END COMMON.SH BOILERPLATE ---
-# Script must be run inside the chroot.
-restart_in_chroot_if_needed "$@"
-
-get_default_board
-
-DEFINE_string board "${DEFAULT_BOARD}" \
- "Board for which to build the package."
-DEFINE_boolean test "${FLAGS_FALSE}" \
- "Compile and run tests as well."
-DEFINE_boolean reconf "${FLAGS_FALSE}" \
- "Re-run configure and prepare steps."
-DEFINE_boolean install "${FLAGS_FALSE}" \
- "Incrementally build and install your package."
-DEFINE_boolean scrub "${FLAGS_FALSE}" \
- "Blow away all in-tree files not managed by git."
-
-set -e
-# Parse command line.
-FLAGS "$@" || exit 1
-eval set -- "${FLAGS_ARGV}"
-
-if [ $# -lt 1 ]; then
- echo "Usage: ${0} [OPTIONS] <package (read: ebuild) basename>"
- exit 1
-fi
-
-if [ -n "${FLAGS_board}" ]; then
- BOARD_DIR=/build/"${FLAGS_board}"
- EBUILDCMD=ebuild-"${FLAGS_board}"
- EMERGECMD=emerge-"${FLAGS_board}"
- EQUERYCMD=equery-"${FLAGS_board}"
- BOARD_STR="${FLAGS_board}"
- BOARD_KEYWORD="$(portageq-${FLAGS_board} envvar ARCH)"
-fi
-
-unstable_suffix="9999"
-workon_name="${1}-${unstable_suffix}"
-pkgfile=
-workpath=
-
-if ! pkgfile=$("${EQUERYCMD}" which "${workon_name}" 2> /dev/null); then
- if ACCEPT_KEYWORDS="~${BOARD_KEYWORD}" "${EQUERYCMD}" which "${workon_name}" \
- > /dev/null 2>&1; then
- die "run 'cros_workon --board ${BOARD_STR} start ${1}' first!" 1>&2
- fi
- die "error looking up package $1"
-fi
-
-if [ "${FLAGS_scrub}" = "${FLAGS_TRUE}" ]; then
- warn "--scrub will destroy ALL FILES unknown to git!"
- read -p "Are you sure you want to do this? [y|N]" resp
- if egrep -qi "^y(es)?$" <(echo -n "${resp}"); then
- eval $(${EBUILDCMD} $(${EQUERYCMD} which ${workon_name}) info)
- srcdir=$(readlink -m ${CROS_WORKON_SRCDIR})
- trunkdir=$(readlink -m ${CHROOT_TRUNK_DIR})
- project_path=${srcdir#${trunkdir}/}
- if ! (cd "${GCLIENT_ROOT}/${project_path}" && git clean -xf); then
- die "Could not scrub source directory"
- fi
- else
- info "Not scrubbing; exiting gracefully"
- fi
- exit 0
-fi
-
-workpath=$(\
- echo "${pkgfile}" | \
- awk -F '/' '{ print $(NF-2) "/" $(NF-1) }')-"${unstable_suffix}"
-
-emerge_features=
-to_do="compile"
-if [ "${FLAGS_test}" = "${FLAGS_TRUE}" ]; then
- to_do="test"
- emerge_features="test"
-fi
-if [ "${FLAGS_install}" = "${FLAGS_TRUE}" ]; then
- SANDBOX_WRITE=~/trunk CROS_WORKON_INPLACE=1 \
- FEATURES="${emerge_features} ${FEATURES}" "${EMERGECMD}" "${1}"
- exit $?
-fi
-
-clean=
-if [ "${FLAGS_reconf}" = "${FLAGS_TRUE}" ]; then
- clean="clean"
-else
- rm -f "/build/${BOARD_STR}/tmp/portage/${workpath}/.compiled"
-fi
-SANDBOX_WRITE=~/trunk CROS_WORKON_INPLACE=1 \
- "${EBUILDCMD}" "${pkgfile}" ${clean} "${to_do}"
+die "error: Please run cros_workon_make from chroot:/usr/bin/cros_workon_make"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698