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
|
2015-03-25 17:38:17 +00:00
|
|
|
|
2014-01-16 05:16:23 +00:00
|
|
|
pkg_url=https://$pkg
|
|
|
|
target_dir=src/$pkg
|
2015-03-25 17:38:17 +00:00
|
|
|
|
2014-01-16 05:16:23 +00:00
|
|
|
echo -n "$pkg @ $rev: "
|
2015-03-25 17:38:17 +00:00
|
|
|
|
2014-01-16 05:16:23 +00:00
|
|
|
if [ -d $target_dir ]; then
|
|
|
|
echo -n 'rm old, '
|
|
|
|
rm -fr $target_dir
|
|
|
|
fi
|
2015-03-25 17:38:17 +00:00
|
|
|
|
2014-01-16 05:16:23 +00:00
|
|
|
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
|
2015-03-25 17:38:17 +00:00
|
|
|
|
2014-01-16 05:16:23 +00:00
|
|
|
echo -n 'rm VCS, '
|
|
|
|
( cd $target_dir && rm -rf .{git,hg} )
|
2015-03-25 17:38:17 +00:00
|
|
|
|
2015-05-07 21:18:22 +00:00
|
|
|
echo -n 'rm vendor, '
|
|
|
|
( cd $target_dir && rm -rf vendor Godeps/_workspace )
|
|
|
|
|
2014-01-16 05:16:23 +00:00
|
|
|
echo done
|
2013-12-19 17:01:55 +00:00
|
|
|
}
|
|
|
|
|
2015-05-07 21:18:22 +00:00
|
|
|
# the following lines are in sorted order, FYI
|
2015-06-03 20:21:58 +00:00
|
|
|
clone git github.com/Sirupsen/logrus v0.8.2 # logrus is a common dependency among multiple deps
|
2015-05-07 21:18:22 +00:00
|
|
|
clone git github.com/docker/libtrust 230dfd18c232
|
|
|
|
clone git github.com/go-check/check 64131543e7896d5bcc6bd5a76287eb75ea96c673
|
2014-06-28 08:38:29 +00:00
|
|
|
clone git github.com/gorilla/context 14f550f51a
|
2015-03-17 18:03:56 +00:00
|
|
|
clone git github.com/gorilla/mux e444e69cbd
|
2015-05-15 07:22:16 +00:00
|
|
|
clone git github.com/kr/pty 5cf931ef8f
|
2015-06-02 07:37:38 +00:00
|
|
|
clone git github.com/mistifyio/go-zfs v2.1.1
|
2015-05-03 05:25:57 +00:00
|
|
|
clone git github.com/tchap/go-patricia v2.1.0
|
2014-01-16 05:16:23 +00:00
|
|
|
clone hg code.google.com/p/go.net 84a4013f96e0
|
|
|
|
clone hg code.google.com/p/gosqlite 74691fb6f837
|
2014-02-13 22:11:39 +00:00
|
|
|
|
2015-05-07 00:09:12 +00:00
|
|
|
#get libnetwork packages
|
2015-06-05 22:02:56 +00:00
|
|
|
clone git github.com/docker/libnetwork ace6b576239cd671d1645d82520b16791737f60d
|
|
|
|
clone git github.com/vishvananda/netns 5478c060110032f972e86a1f844fdb9a2f008f2c
|
2015-05-07 00:09:12 +00:00
|
|
|
clone git github.com/vishvananda/netlink 8eb64238879fed52fd51c5b30ad20b928fb4c36c
|
|
|
|
|
2015-03-17 18:03:56 +00:00
|
|
|
# get distribution packages
|
2015-05-29 05:50:56 +00:00
|
|
|
clone git github.com/docker/distribution b9eeb328080d367dbde850ec6e94f1e4ac2b5efe
|
2015-03-11 15:17:22 +00:00
|
|
|
mv src/github.com/docker/distribution/digest tmp-digest
|
2015-03-17 18:03:56 +00:00
|
|
|
mv src/github.com/docker/distribution/registry/api tmp-api
|
2015-03-11 15:17:22 +00:00
|
|
|
rm -rf src/github.com/docker/distribution
|
|
|
|
mkdir -p src/github.com/docker/distribution
|
|
|
|
mv tmp-digest src/github.com/docker/distribution/digest
|
2015-03-17 18:03:56 +00:00
|
|
|
mkdir -p src/github.com/docker/distribution/registry
|
|
|
|
mv tmp-api src/github.com/docker/distribution/registry/api
|
2015-03-11 15:17:22 +00:00
|
|
|
|
2015-06-09 20:54:57 +00:00
|
|
|
clone git github.com/docker/libcontainer v2.1.1
|
2015-05-07 21:18:22 +00:00
|
|
|
# libcontainer deps (see src/github.com/docker/libcontainer/update-vendor.sh)
|
|
|
|
clone git github.com/coreos/go-systemd v2
|
|
|
|
clone git github.com/godbus/dbus v2
|
2015-05-08 16:22:34 +00:00
|
|
|
clone git github.com/syndtr/gocapability 66ef2aa7a23ba682594e2b6f74cf40c0692b49fb
|
2015-05-26 19:47:57 +00:00
|
|
|
clone git github.com/golang/protobuf 655cdfa588ea
|