2014-01-21 20:21:56 -05:00
|
|
|
#!/usr/bin/env bash
|
2014-01-16 00:16:23 -05:00
|
|
|
set -e
|
2013-08-26 18:51:22 -04:00
|
|
|
|
2014-01-16 00:16:23 -05:00
|
|
|
cd "$(dirname "$BASH_SOURCE")/.."
|
2013-12-19 12:01:55 -05:00
|
|
|
|
2014-01-16 00:16:23 -05: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-16 00:16:23 -05:00
|
|
|
pkg_url=https://$pkg
|
|
|
|
target_dir=src/$pkg
|
2015-03-25 13:38:17 -04:00
|
|
|
|
2014-01-16 00:16:23 -05:00
|
|
|
echo -n "$pkg @ $rev: "
|
2015-03-25 13:38:17 -04:00
|
|
|
|
2014-01-16 00:16:23 -05: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-16 00:16:23 -05: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-16 00:16:23 -05:00
|
|
|
echo -n 'rm VCS, '
|
|
|
|
( cd $target_dir && rm -rf .{git,hg} )
|
2015-03-25 13:38:17 -04:00
|
|
|
|
2014-01-16 00:16:23 -05:00
|
|
|
echo done
|
2013-12-19 12:01:55 -05:00
|
|
|
}
|
|
|
|
|
2014-12-17 16:23:24 -05:00
|
|
|
clone git github.com/kr/pty 05017fcccf
|
2013-08-26 18:51:22 -04:00
|
|
|
|
2014-06-28 04:38:29 -04:00
|
|
|
clone git github.com/gorilla/context 14f550f51a
|
2013-08-26 18:51:22 -04:00
|
|
|
|
2014-05-20 17:18:52 -04:00
|
|
|
clone git github.com/gorilla/mux 136d54f81f
|
2013-08-26 18:51:22 -04:00
|
|
|
|
2014-06-28 04:20:31 -04:00
|
|
|
clone git github.com/tchap/go-patricia v1.0.1
|
2014-06-24 18:24:02 -04:00
|
|
|
|
2014-01-16 00:16:23 -05:00
|
|
|
clone hg code.google.com/p/go.net 84a4013f96e0
|
2013-12-19 12:01:55 -05:00
|
|
|
|
2014-01-16 00:16:23 -05:00
|
|
|
clone hg code.google.com/p/gosqlite 74691fb6f837
|
2014-02-13 17:11:39 -05:00
|
|
|
|
2014-11-17 14:39:55 -05:00
|
|
|
clone git github.com/docker/libtrust 230dfd18c232
|
2014-09-24 20:29:23 -04:00
|
|
|
|
2015-03-27 21:38:00 -04:00
|
|
|
clone git github.com/Sirupsen/logrus v0.7.2
|
2014-10-24 12:38:36 -04:00
|
|
|
|
2014-12-11 16:52:52 -05:00
|
|
|
clone git github.com/go-fsnotify/fsnotify v1.0.4
|
|
|
|
|
2014-07-03 01:28:39 -04: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 16:17:11 -04: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 04:34:06 -05:00
|
|
|
|
2015-03-11 11:17:22 -04:00
|
|
|
# get digest package from distribution
|
2015-03-18 21:44:15 -04:00
|
|
|
clone git github.com/docker/distribution d957768537c5af40e4f4cd96871f7b2bde9e2923
|
2015-03-11 11:17:22 -04:00
|
|
|
mv src/github.com/docker/distribution/digest tmp-digest
|
|
|
|
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-30 19:29:00 -04:00
|
|
|
clone git github.com/docker/libcontainer c8512754166539461fd860451ff1a0af7491c197
|
2014-08-06 15:07:07 -04: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 13:43:56 -04: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 15:07:07 -04:00
|
|
|
# we exclude "github.com/codegangsta/cli" here because it's only needed for "nsinit", which Docker doesn't include
|