| OLD | NEW |
| 1 #!/usr/bin/env bash | 1 #!/usr/bin/env bash |
| 2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 # This script will try to sync the bootstrap directories and then defer control. | 6 # This script will try to sync the bootstrap directories and then defer control. |
| 7 | 7 |
| 8 base_dir=$(dirname "$0") | 8 base_dir=$(dirname "$0") |
| 9 if [ -L "$base_dir" ] |
| 10 then |
| 11 base_dir=`cd "$base_dir" && pwd -P` |
| 12 fi |
| 9 | 13 |
| 10 # Test git and git --version. | 14 # Test git and git --version. |
| 11 function test_git { | 15 function test_git { |
| 12 local GITV="$(git --version)" || { | 16 local GITV="$(git --version)" || { |
| 13 echo "git isn't installed, please install it" | 17 echo "git isn't installed, please install it" |
| 14 exit 1 | 18 exit 1 |
| 15 } | 19 } |
| 16 | 20 |
| 17 GITV="${GITV##* }" # Only examine last word (i.e. version number) | 21 GITV="${GITV##* }" # Only examine last word (i.e. version number) |
| 18 local GITD=( ${GITV//./ } ) # Split version number into decimals | 22 local GITD=( ${GITV//./ } ) # Split version number into decimals |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 then | 65 then |
| 62 # Update the bootstrap directory to stay up-to-date with the latest | 66 # Update the bootstrap directory to stay up-to-date with the latest |
| 63 # depot_tools. | 67 # depot_tools. |
| 64 BEFORE_REVISION=$(get_svn_revision) | 68 BEFORE_REVISION=$(get_svn_revision) |
| 65 svn -q up "$base_dir" | 69 svn -q up "$base_dir" |
| 66 AFTER_REVISION=$(get_svn_revision) | 70 AFTER_REVISION=$(get_svn_revision) |
| 67 if [[ "$BEFORE_REVISION" != "$AFTER_REVISION" ]]; then | 71 if [[ "$BEFORE_REVISION" != "$AFTER_REVISION" ]]; then |
| 68 echo "Depot Tools has been updated to revision $AFTER_REVISION." 1>&2 | 72 echo "Depot Tools has been updated to revision $AFTER_REVISION." 1>&2 |
| 69 fi | 73 fi |
| 70 fi | 74 fi |
| OLD | NEW |