A refactoring left cygwin busted.

Create an update_depot_tools.bat file to use for updated when on cygwin, and
properly call it from the update_depot_tools shell script and gclient batch
files.

BUG=none
TEST=gclient sync and git cl work again on cygwin.  Can also turn echo on in update_depot_tools.bat to verify updating working correctly.

Review URL: http://codereview.chromium.org/3856006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@63234 0039d316-1c4b-4281-b951-d872f2087c98
parent b153d873
......@@ -3,19 +3,8 @@
:: Use of this source code is governed by a BSD-style license that can be
:: found in the LICENSE file.
:: This batch file will try to sync the root directory and call back gclient.
:: Synchronize the root directory before deferring control back up to it.
call "%~dp0\update_depot_tools.bat"
setlocal
:: Shall skip automatic update?
IF "%DEPOT_TOOLS_UPDATE%" == "0" GOTO :gclient
:: We can't sync if ..\.svn\. doesn't exist.
IF NOT EXIST "%~dp0..\.svn\." GOTO :gclient
:: Sync the .. directory to update the bootstrap at the same time.
call svn -q up "%~dp0.."
:gclient
:: Defer control.
python "%~dp0\..\gclient.py" %*
@echo off
:: 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.
:: This batch file will try to sync the root directory.
:: Shall skip automatic update?
IF "%DEPOT_TOOLS_UPDATE%" == "0" GOTO :EOF
:: We can't sync if ..\.svn\. doesn't exist.
IF NOT EXIST "%~dp0..\.svn\." GOTO :EOF
:: Sync the .. directory to update the bootstrap at the same time.
call svn -q up "%~dp0.."
......@@ -5,6 +5,13 @@
base_dir=$(dirname "$0")
# Use the batch file as an entry point if on cygwin. Needs to happen before
# the call to update the tools or the update will happen twice.
if [ "${OSTYPE}" = "cygwin" -a "${TERM}" != "xterm" ]; then
${base_dir}/gclient.bat "$@"
exit
fi
"$base_dir"/update_depot_tools
exec python "$base_dir/gclient.py" "$@"
......@@ -54,11 +54,10 @@ fi
# Use the batch file as an entry point if on cygwin.
if [ "${OSTYPE}" = "cygwin" -a "${TERM}" != "xterm" ]; then
${base_dir}/gclient.bat "$@"
exit
${base_dir}/bootstrap/update_depot_tools.bat
exit
fi
# We're on POSIX (not cygwin). We can now safely look for svn checkout.
if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/.svn" ]
then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment