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
|
|
|
|
2014-01-15 22:16:23 -07:00
|
|
|
echo done
|
2013-12-19 11:01:55 -06:00
|
|
|
}
|
|
|
|
|
2014-12-17 23:23:24 +02:00
|
|
|
clone git github.com/kr/pty 05017fcccf
|
2013-08-26 15:51:22 -07:00
|
|
|
|
2014-06-28 12:38:29 +04:00
|
|
|
clone git github.com/gorilla/context 14f550f51a
|
2013-08-26 15:51:22 -07:00
|
|
|
|
2015-03-17 11:03:56 -07:00
|
|
|
clone git github.com/gorilla/mux e444e69cbd
|
2013-08-26 15:51:22 -07:00
|
|
|
|
2015-05-02 23:25:57 -06:00
|
|
|
clone git github.com/tchap/go-patricia v2.1.0
|
2014-06-25 01:24:02 +03:00
|
|
|
|
2014-01-15 22:16:23 -07:00
|
|
|
clone hg code.google.com/p/go.net 84a4013f96e0
|
2013-12-19 11:01:55 -06:00
|
|
|
|
2014-01-15 22:16:23 -07:00
|
|
|
clone hg code.google.com/p/gosqlite 74691fb6f837
|
2014-02-13 15:11:39 -07:00
|
|
|
|
2014-11-17 19:39:55 +00:00
|
|
|
clone git github.com/docker/libtrust 230dfd18c232
|
2014-09-24 17:29:23 -07:00
|
|
|
|
2015-03-27 18:38:00 -07:00
|
|
|
clone git github.com/Sirupsen/logrus v0.7.2
|
2014-10-24 09:38:36 -07:00
|
|
|
|
2015-05-02 23:28:15 -06:00
|
|
|
clone git github.com/go-fsnotify/fsnotify v1.2.0
|
2014-12-11 14:52:52 -07:00
|
|
|
|
2015-04-18 09:45:24 -07:00
|
|
|
clone git github.com/go-check/check 64131543e7896d5bcc6bd5a76287eb75ea96c673
|
|
|
|
|
2015-03-17 11:03:56 -07:00
|
|
|
# get distribution packages
|
2015-03-18 18:44:15 -07:00
|
|
|
clone git github.com/docker/distribution d957768537c5af40e4f4cd96871f7b2bde9e2923
|
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-04-07 15:10:44 -07:00
|
|
|
clone git github.com/docker/libcontainer bd8ec36106086f72b66e1be85a81202b93503e44
|
2014-08-06 13:07:07 -06: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
|
2015-03-11 10:43:56 -07:00
|
|
|
eval "$(grep '^clone ' src/github.com/docker/libcontainer/update-vendor.sh | grep -v 'github.com/codegangsta/cli' | grep -v 'github.com/Sirupsen/logrus')"
|
2014-08-06 13:07:07 -06:00
|
|
|
# we exclude "github.com/codegangsta/cli" here because it's only needed for "nsinit", which Docker doesn't include
|