1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

hack/vendor.sh: overwrite existing dependencies and remove .git so they can be checked in

This commit is contained in:
Solomon Hykes 2013-09-11 18:38:09 -07:00
parent ebee8f28ac
commit 45cedefadb
2 changed files with 7 additions and 4 deletions

3
.gitignore vendored
View file

@ -14,5 +14,6 @@ docs/_templates
.gopath/
.dotcloud
*.test
vendor/
bundles/
.hg/
.git/

View file

@ -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
)
}