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

Side by Side Diff: hammer

Issue 165495: Updating hammer script based on review suggestions. (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/depot_tools/
Patch Set: Created 11 years, 4 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 | « no previous file | 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/sh 1 #!/bin/sh
2 # 2 #
3 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2006-2008 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 # A script to invoke scons in gyp generated projects. 7 # A script to invoke scons in gyp generated projects.
8 8
9 # Find the 'src' directory by looking for the site_scons directory. 9 # Find the 'src' directory by looking for the site_scons directory.
10 # This method allows trees that don't use the name src to use this script. 10 # This method allows trees that don't use the name src to use this script.
11 # Explicitly skip site_scons directories that are from the 'software 11 # Explicitly skip site_scons directories that are from the 'software
12 # construction toolkit', since these are not gyp compatible. 12 # construction toolkit', since these are not gyp compatible.
13 SRC_DIR=`pwd` 13 SRC_DIR=`pwd`
14 while `test ! -d "${SRC_DIR}/site_scons" -o \ 14 while [ ! -d "${SRC_DIR}/site_scons" ] || \
15 -e "${SRC_DIR}/site_scons/site_tools/component_setup.py"`; do 15 [ -e "${SRC_DIR}/site_scons/site_tools/component_setup.py" ]; do
16 PARENT_DIR="$(dirname ${SRC_DIR})" 16 PARENT_DIR="$(dirname "${SRC_DIR}")"
17 if `test "${SRC_DIR}" = "${PARENT_DIR}"`; then 17 if [ "${SRC_DIR}" = "${PARENT_DIR}" ]; then
18 echo "ERROR: hammer must be run in a directory with site_scons under" >&2 18 echo "ERROR: hammer must be run in a directory with site_scons under" >&2
19 echo " the root of the project tree." >&2 19 echo " the root of the project tree." >&2
20 exit 1 20 exit 1
21 fi 21 fi
22 SRC_DIR="${PARENT_DIR}" 22 SRC_DIR="${PARENT_DIR}"
23 done 23 done
24 24
25 SCONS="${SRC_DIR}/third_party/scons/scons.py" 25 SCONS="${SRC_DIR}/third_party/scons/scons.py"
26 SITE_SCONS="${SRC_DIR}/site_scons" 26 SITE_SCONS="${SRC_DIR}/site_scons"
27 27
28 exec python "${SCONS}" "--site-dir=${SITE_SCONS}" "$@" 28 exec python "${SCONS}" "--site-dir=${SITE_SCONS}" "$@"
OLDNEW
« 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