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
|
|
|
|
2015-05-07 17:18:22 -04:00
|
|
|
echo -n 'rm vendor, '
|
|
|
|
( cd $target_dir && rm -rf vendor Godeps/_workspace )
|
|
|
|
|
2014-01-16 00:16:23 -05:00
|
|
|
echo done
|
2013-12-19 12:01:55 -05:00
|
|
|
}
|
|
|
|
|
2015-05-07 17:18:22 -04:00
|
|
|
# the following lines are in sorted order, FYI
|
|
|
|
clone git github.com/Sirupsen/logrus v0.7.3 # logrus is a common dependency among multiple deps
|
|
|
|
clone git github.com/docker/libtrust 230dfd18c232
|
|
|
|
clone git github.com/go-check/check 64131543e7896d5bcc6bd5a76287eb75ea96c673
|
|
|
|
clone git github.com/go-fsnotify/fsnotify v1.2.0
|
2014-06-28 04:38:29 -04:00
|
|
|
clone git github.com/gorilla/context 14f550f51a
|
2015-03-17 14:03:56 -04:00
|
|
|
clone git github.com/gorilla/mux e444e69cbd
|
2015-05-15 03:22:16 -04:00
|
|
|
clone git github.com/kr/pty 5cf931ef8f
|
2015-05-13 14:52:59 -04:00
|
|
|
clone git github.com/mistifyio/go-zfs v2.1.0
|
2015-05-03 01:25:57 -04:00
|
|
|
clone git github.com/tchap/go-patricia v2.1.0
|
2014-01-16 00:16:23 -05:00
|
|
|
clone hg code.google.com/p/go.net 84a4013f96e0
|
|
|
|
clone hg code.google.com/p/gosqlite 74691fb6f837
|
2014-02-13 17:11:39 -05:00
|
|
|
|
2015-03-17 14:03:56 -04:00
|
|
|
# get distribution packages
|
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
|
2015-03-17 14:03:56 -04:00
|
|
|
mv src/github.com/docker/distribution/registry/api tmp-api
|
2015-03-11 11:17:22 -04: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 14:03:56 -04:00
|
|
|
mkdir -p src/github.com/docker/distribution/registry
|
|
|
|
mv tmp-api src/github.com/docker/distribution/registry/api
|
2015-03-11 11:17:22 -04:00
|
|
|
|
2015-05-13 16:55:26 -04:00
|
|
|
clone git github.com/docker/libcontainer a37b2a4f152e2a1c9de596f54c051cb889de0691
|
2015-05-07 17:18:22 -04: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 12:22:34 -04:00
|
|
|
clone git github.com/syndtr/gocapability 66ef2aa7a23ba682594e2b6f74cf40c0692b49fb
|