2014-01-22 01:21:56 +00:00
|
|
|
#!/usr/bin/env bash
|
2014-01-16 05:16:23 +00:00
|
|
|
set -e
|
2013-08-26 22:51:22 +00:00
|
|
|
|
2014-01-16 05:16:23 +00:00
|
|
|
cd "$(dirname "$BASH_SOURCE")/.."
|
2013-12-19 17:01:55 +00:00
|
|
|
|
2014-01-16 05:16:23 +00:00
|
|
|
# Downloads dependencies into vendor/ directory
|
|
|
|
mkdir -p vendor
|
|
|
|
cd vendor
|
|
|
|
|
|
|
|
clone() {
|
|
|
|
vcs=$1
|
|
|
|
pkg=$2
|
|
|
|
rev=$3
|
|
|
|
|
|
|
|
pkg_url=https://$pkg
|
|
|
|
target_dir=src/$pkg
|
|
|
|
|
|
|
|
echo -n "$pkg @ $rev: "
|
|
|
|
|
|
|
|
if [ -d $target_dir ]; then
|
|
|
|
echo -n 'rm old, '
|
|
|
|
rm -fr $target_dir
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo -n 'clone, '
|
|
|
|
case $vcs in
|
|
|
|
git)
|
|
|
|
git clone --quiet --no-checkout $pkg_url $target_dir
|
|
|
|
( cd $target_dir && git reset --quiet --hard $rev )
|
|
|
|
;;
|
|
|
|
hg)
|
|
|
|
hg clone --quiet --updaterev $rev $pkg_url $target_dir
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
echo -n 'rm VCS, '
|
|
|
|
( cd $target_dir && rm -rf .{git,hg} )
|
|
|
|
|
|
|
|
echo done
|
2013-12-19 17:01:55 +00:00
|
|
|
}
|
|
|
|
|
2014-12-17 21:23:24 +00:00
|
|
|
clone git github.com/kr/pty 05017fcccf
|
2013-08-26 22:51:22 +00:00
|
|
|
|
2014-06-28 08:38:29 +00:00
|
|
|
clone git github.com/gorilla/context 14f550f51a
|
2013-08-26 22:51:22 +00:00
|
|
|
|
2014-05-20 21:18:52 +00:00
|
|
|
clone git github.com/gorilla/mux 136d54f81f
|
2013-08-26 22:51:22 +00:00
|
|
|
|
2014-06-28 08:20:31 +00:00
|
|
|
clone git github.com/tchap/go-patricia v1.0.1
|
2014-06-24 22:24:02 +00:00
|
|
|
|
2014-01-16 05:16:23 +00:00
|
|
|
clone hg code.google.com/p/go.net 84a4013f96e0
|
2013-12-19 17:01:55 +00:00
|
|
|
|
2014-01-16 05:16:23 +00:00
|
|
|
clone hg code.google.com/p/gosqlite 74691fb6f837
|
2014-02-13 22:11:39 +00:00
|
|
|
|
2014-11-17 19:39:55 +00:00
|
|
|
clone git github.com/docker/libtrust 230dfd18c232
|
2014-09-25 00:29:23 +00:00
|
|
|
|
2014-11-03 19:31:37 +00:00
|
|
|
clone git github.com/Sirupsen/logrus v0.6.0
|
2014-10-24 16:38:36 +00:00
|
|
|
|
2014-12-11 21:52:52 +00:00
|
|
|
clone git github.com/go-fsnotify/fsnotify v1.0.4
|
|
|
|
|
2014-07-03 05:28:39 +00:00
|
|
|
# get Go tip's archive/tar, for xattr support and improved performance
|
|
|
|
# TODO after Go 1.4 drops, bump our minimum supported version and drop this vendored dep
|
2014-08-20 20:17:11 +00:00
|
|
|
if [ "$1" = '--go' ]; then
|
|
|
|
# Go takes forever and a half to clone, so we only redownload it when explicitly requested via the "--go" flag to this script.
|
|
|
|
clone hg code.google.com/p/go 1b17b3426e3c
|
|
|
|
mv src/code.google.com/p/go/src/pkg/archive/tar tmp-tar
|
|
|
|
rm -rf src/code.google.com/p/go
|
|
|
|
mkdir -p src/code.google.com/p/go/src/pkg/archive
|
|
|
|
mv tmp-tar src/code.google.com/p/go/src/pkg/archive/tar
|
|
|
|
fi
|
2014-02-21 09:34:06 +00:00
|
|
|
|
2015-01-26 22:00:44 +00:00
|
|
|
# this commit is from docker_1.5 branch in libcontainer, pls delete that branch when you'll update libcontainer again
|
|
|
|
clone git github.com/docker/libcontainer 2d3b5af7486f1a4e80a5ed91859d309b4eebf80c
|
2014-08-06 19:07:07 +00:00
|
|
|
# see src/github.com/docker/libcontainer/update-vendor.sh which is the "source of truth" for libcontainer deps (just like this file)
|
|
|
|
rm -rf src/github.com/docker/libcontainer/vendor
|
|
|
|
eval "$(grep '^clone ' src/github.com/docker/libcontainer/update-vendor.sh | grep -v 'github.com/codegangsta/cli')"
|
|
|
|
# we exclude "github.com/codegangsta/cli" here because it's only needed for "nsinit", which Docker doesn't include
|