From 45cedefadb444e8d7305defd246c63537fca04df Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Wed, 11 Sep 2013 18:38:09 -0700 Subject: [PATCH] hack/vendor.sh: overwrite existing dependencies and remove .git so they can be checked in --- .gitignore | 3 ++- hack/vendor.sh | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index ca58f735cb..5843eaf9cc 100644 --- a/.gitignore +++ b/.gitignore @@ -14,5 +14,6 @@ docs/_templates .gopath/ .dotcloud *.test -vendor/ bundles/ +.hg/ +.git/ diff --git a/hack/vendor.sh b/hack/vendor.sh index d327911047..5287449b4f 100755 --- a/hack/vendor.sh +++ b/hack/vendor.sh @@ -12,10 +12,12 @@ git_clone () { ( set -e cd $vendor_dir - if [[ ! -d src/$PKG ]]; then - cd $vendor_dir && git clone http://$PKG src/$PKG + if [[ -d src/$PKG ]]; then + echo "src/$PKG already exists. Removing." + rm -fr src/$PKG fi - cd src/$PKG && git checkout -f $REV + cd $vendor_dir && git clone http://$PKG src/$PKG + cd src/$PKG && git checkout -f $REV && rm -fr .git ) }