github.com/jogo/docker@v1.7.0-rc1/hack/vendor.sh (about) 1 #!/usr/bin/env bash 2 set -e 3 4 cd "$(dirname "$BASH_SOURCE")/.." 5 6 # Downloads dependencies into vendor/ directory 7 mkdir -p vendor 8 cd vendor 9 10 clone() { 11 vcs=$1 12 pkg=$2 13 rev=$3 14 15 pkg_url=https://$pkg 16 target_dir=src/$pkg 17 18 echo -n "$pkg @ $rev: " 19 20 if [ -d $target_dir ]; then 21 echo -n 'rm old, ' 22 rm -fr $target_dir 23 fi 24 25 echo -n 'clone, ' 26 case $vcs in 27 git) 28 git clone --quiet --no-checkout $pkg_url $target_dir 29 ( cd $target_dir && git reset --quiet --hard $rev ) 30 ;; 31 hg) 32 hg clone --quiet --updaterev $rev $pkg_url $target_dir 33 ;; 34 esac 35 36 echo -n 'rm VCS, ' 37 ( cd $target_dir && rm -rf .{git,hg} ) 38 39 echo -n 'rm vendor, ' 40 ( cd $target_dir && rm -rf vendor Godeps/_workspace ) 41 42 echo done 43 } 44 45 # the following lines are in sorted order, FYI 46 clone git github.com/Sirupsen/logrus v0.7.3 # logrus is a common dependency among multiple deps 47 clone git github.com/docker/libtrust 230dfd18c232 48 clone git github.com/go-check/check 64131543e7896d5bcc6bd5a76287eb75ea96c673 49 clone git github.com/gorilla/context 14f550f51a 50 clone git github.com/gorilla/mux e444e69cbd 51 clone git github.com/kr/pty 5cf931ef8f 52 clone git github.com/mistifyio/go-zfs v2.1.0 53 clone git github.com/tchap/go-patricia v2.1.0 54 clone hg code.google.com/p/go.net 84a4013f96e0 55 clone hg code.google.com/p/gosqlite 74691fb6f837 56 57 #get libnetwork packages 58 clone git github.com/docker/libnetwork 2da2dc055de5a474c8540871ad88a48213b0994f 59 clone git github.com/vishvananda/netns 008d17ae001344769b031375bdb38a86219154c6 60 clone git github.com/vishvananda/netlink 8eb64238879fed52fd51c5b30ad20b928fb4c36c 61 62 # get distribution packages 63 clone git github.com/docker/distribution d957768537c5af40e4f4cd96871f7b2bde9e2923 64 mv src/github.com/docker/distribution/digest tmp-digest 65 mv src/github.com/docker/distribution/registry/api tmp-api 66 rm -rf src/github.com/docker/distribution 67 mkdir -p src/github.com/docker/distribution 68 mv tmp-digest src/github.com/docker/distribution/digest 69 mkdir -p src/github.com/docker/distribution/registry 70 mv tmp-api src/github.com/docker/distribution/registry/api 71 72 clone git github.com/docker/libcontainer a37b2a4f152e2a1c9de596f54c051cb889de0691 73 # libcontainer deps (see src/github.com/docker/libcontainer/update-vendor.sh) 74 clone git github.com/coreos/go-systemd v2 75 clone git github.com/godbus/dbus v2 76 clone git github.com/syndtr/gocapability 66ef2aa7a23ba682594e2b6f74cf40c0692b49fb