blob: bb3568b6fcec98ab06cb373e8f77f4b1dd49c5ad [file] [log] [blame]
maruel@chromium.org565db0e2009-06-05 18:08:54 +00001#!/bin/sh
2# Copyright (c) 2009 The Chromium Authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6base_dir=$(dirname "$0")
msb@chromium.orgdffe4942009-11-18 02:25:16 +00007url="http://src.chromium.org/git/git-cl.git"
8cur_url=$(git config -f "$base_dir/git-cl-repo/.git/config" remote.origin.url)
9
10if [ "$cur_url" != "$url" ]; then
11 rm -rf $base_dir/git-cl-repo
12fi
maruel@chromium.org565db0e2009-06-05 18:08:54 +000013
14if [ ! -f "$base_dir/git-cl-repo/git-cl" ]; then
msb@chromium.orgdffe4942009-11-18 02:25:16 +000015 git clone $url $base_dir/git-cl-repo -q
maruel@chromium.org565db0e2009-06-05 18:08:54 +000016fi
17
maruel@chromium.org43418e42009-06-09 19:47:40 +000018$base_dir/git-cl-repo/git-cl "$@"