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