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

Side by Side Diff: hammer

Issue 164099: Fixing up hammer script to work in the nacl and o3d trees.... (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 #
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
5 # found in the LICENSE file.
2 6
3 # The first expression catches when we're actually in the /src directory. 7 # A script to invoke scons in gyp generated projects.
4 # The second expressions strips everything after the last /src occurrence. 8
5 SRC_DIR=`pwd | sed -e '\;/src$;q' -e 's;\(.*/src\)/.*;\1;'` 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.
11 # Explicitly skip site_scons directories that are from the 'software
12 # construction toolkit', since these are not gyp compatible.
13 SRC_DIR=`pwd`
14 while `test ! -d "${SRC_DIR}/site_scons" -o \
15 -e "${SRC_DIR}/site_scons/site_tools/component_setup.py"`; do
16 PARENT_DIR="$(dirname ${SRC_DIR})"
17 if `test "${SRC_DIR}" == "${PARENT_DIR}"`; then
18 echo "ERROR: hammer must be run in a directory with site_scons under" >&2
19 echo " the root of the project tree." >&2
20 exit 1
21 fi
22 SRC_DIR="${PARENT_DIR}"
23 done
24
6 SCONS="${SRC_DIR}/third_party/scons/scons.py" 25 SCONS="${SRC_DIR}/third_party/scons/scons.py"
7 SITE_SCONS="${SRC_DIR}/site_scons" 26 SITE_SCONS="${SRC_DIR}/site_scons"
8 27
9 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