Reapply 18633 that was reverted in 18634 because bootstrap/gclient.sh was not found.

Now update git depot_tools checkouts, also add automatic update for git-cl-repo and git-try-repo.

The difference with 18633 is that it leaves bootstrap/gclient.sh along. I'll remove it in a month or so to not break anyone in the meantime.

TEST=none
BUG=none
TBR=evan
Review URL: http://codereview.chromium.org/129001

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@18637 0039d316-1c4b-4281-b951-d872f2087c98
experimental/szager/collated-output
maruel@chromium.org 16 years ago
parent 0a3488a5a8
commit 522ca09c54

@ -6,7 +6,24 @@
# This script will try to sync the bootstrap directories and then defer control.
base_dir=$(dirname "$0")
# Update git checkouts prior the cygwin check, we don't want to use msysgit.
if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/.git" ]
then
(cd "$base_dir"; git svn fetch -q; git merge trunk -q)
fi
if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/git-cl-repo/.git" ]
then
(cd "$base_dir/git-cl-repo"; git pull -q)
fi
if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/git-try-repo/.git" ]
then
(cd "$base_dir/git-try-repo"; git pull -q)
fi
# Use the batch file as an entry point if on cygwin.
if [ "${OSTYPE}" = "cygwin" -a "${TERM}" = "cygwin" ]; then
${base_dir}/gclient.bat "$@"
@ -14,14 +31,12 @@ if [ "${OSTYPE}" = "cygwin" -a "${TERM}" = "cygwin" ]; then
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
# Update the bootstrap directory to stay up-to-date with the latest
# depot_tools.
svn -q up "$base_dir/bootstrap"
# Then defer the control to the bootstrapper.
exec "$base_dir/bootstrap/gclient.sh" "$@"
else
exec python "$base_dir/gclient.py" "$@"
svn -q up "$base_dir"
fi
exec python "$base_dir/gclient.py" "$@"

Loading…
Cancel
Save