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 # Determine script directory. | 7 # Determine script directory. |
8 if [[ $0 == '/'* ]]; | 8 SCRIPT_DIR=$(dirname $(readlink -f "$0")) |
vb
2010/08/19 23:15:35
This is a noop change, right?
It of course is a
gauravsh
2010/08/19 23:34:47
FYI, The original complicated logic for determinin
Bill Richardson
2010/08/19 23:59:34
Yes. That's why I added it in the first place. The
| |
9 then | |
10 SCRIPT_DIR="`dirname $0`" | |
11 elif [[ $0 == './'* ]]; | |
12 then | |
13 SCRIPT_DIR="`pwd`" | |
14 else | |
15 SCRIPT_DIR="`pwd`"/"`dirname $0`" | |
16 fi | |
17 | 9 |
18 ROOT_DIR="$(dirname ${SCRIPT_DIR})" | 10 ROOT_DIR="$(dirname ${SCRIPT_DIR})" |
19 BUILD_DIR="${ROOT_DIR}/build" | 11 BUILD_DIR="${ROOT_DIR}/build" |
20 UTIL_DIR="${BUILD_DIR}/utility" | 12 UTIL_DIR="${BUILD_DIR}/utility" |
21 TEST_DIR="${BUILD_DIR}/tests" | 13 TEST_DIR="${BUILD_DIR}/tests" |
22 TESTKEY_DIR=${SCRIPT_DIR}/testkeys | 14 TESTKEY_DIR=${SCRIPT_DIR}/testkeys |
23 TESTCASE_DIR=${SCRIPT_DIR}/testcases | 15 TESTCASE_DIR=${SCRIPT_DIR}/testcases |
24 TESTKEY_SCRATCH_DIR=${TEST_DIR}/testkeys | 16 TESTKEY_SCRATCH_DIR=${TEST_DIR}/testkeys |
25 | 17 |
26 if [ ! -d ${TESTKEY_SCRATCH_DIR} ]; then | 18 if [ ! -d ${TESTKEY_SCRATCH_DIR} ]; then |
(...skipping 21 matching lines...) Expand all Loading... | |
48 function error { | 40 function error { |
49 echo -e "${COL_RED}ERROR: $*${COL_STOP}" 1>&2 | 41 echo -e "${COL_RED}ERROR: $*${COL_STOP}" 1>&2 |
50 exit 1 | 42 exit 1 |
51 } | 43 } |
52 | 44 |
53 function check_test_keys { | 45 function check_test_keys { |
54 [ -d ${TESTKEY_DIR} ] || \ | 46 [ -d ${TESTKEY_DIR} ] || \ |
55 error "You must run gen_test_keys.sh to generate test keys first." | 47 error "You must run gen_test_keys.sh to generate test keys first." |
56 } | 48 } |
57 | 49 |
OLD | NEW |