Index: update_depot_tools |
=================================================================== |
--- update_depot_tools (revision 86548) |
+++ update_depot_tools (working copy) |
@@ -1,5 +1,5 @@ |
#!/usr/bin/env bash |
-# Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+# Copyright (c) 2010 The Chromium Authors. All rights reserved. |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
@@ -17,24 +17,9 @@ |
base_dir=`cd "$base_dir" && pwd -P` |
fi |
-# Test if this script is running under a MSys install. If it is, we will |
-# hardcode the paths to SVN and Git where possible. |
-OUTPUT="$(uname | grep 'MINGW')" |
-MINGW=$? |
- |
-SVN="svn" |
-if [ -d "$base_dir/svn_bin" -a $MINGW = 0 ]; then |
- SVN="$base_dir/svn_bin/svn.exe" |
-fi |
- |
-GIT="git" |
-if [ -d "$base_dir/git_bin" -a $MINGW = 0 ]; then |
- GIT="$base_dir/git_bin/bin/git.exe" |
-fi |
- |
# Test git and git --version. |
function test_git { |
- local GITV="$("$GIT" --version)" || { |
+ local GITV="$(git --version)" || { |
echo "git isn't installed, please install it" |
exit 1 |
} |
@@ -49,7 +34,7 @@ |
# Test git svn and git svn --version. |
function test_git_svn { |
- local GITV="$("$GIT" svn --version)" || { |
+ local GITV="$(git svn --version)" || { |
echo "git-svn isn't installed, please install it" |
exit 1 |
} |
@@ -65,7 +50,7 @@ |
# Get the current SVN revision. |
get_svn_revision() { |
- LANGUAGE=C "$SVN" info "$base_dir" | \ |
+ LANGUAGE=C svn info "$base_dir" | \ |
awk -F': ' '{ if ($1 == "Last Changed Rev") { print $2 }}' |
} |
@@ -75,7 +60,7 @@ |
cd $base_dir |
test_git_svn |
# work around a git-svn --quiet bug |
- OUTPUT=`"$GIT" svn rebase -q -q` |
+ OUTPUT=`git svn rebase -q -q` |
if [[ ! "$OUTPUT" == *Current.branch* ]]; then |
echo $OUTPUT 1>&2 |
fi |
@@ -88,7 +73,7 @@ |
# Update the bootstrap directory to stay up-to-date with the latest |
# depot_tools. |
BEFORE_REVISION=$(get_svn_revision) |
- "$SVN" -q up "$base_dir" |
+ svn -q up "$base_dir" |
AFTER_REVISION=$(get_svn_revision) |
if [[ "$BEFORE_REVISION" != "$AFTER_REVISION" ]]; then |
echo "Depot Tools has been updated to revision $AFTER_REVISION." 1>&2 |