# this script is used to update vendored dependencies
#
# Usage:
# vendor.sh revendor all dependencies
# vendor.sh github.com/docker/engine-api revendor only the engine-api dependency.
# vendor.sh github.com/docker/engine-api v0.3.3 vendor only engine-api at the specified tag/commit.
# vendor.sh git github.com/docker/engine-api v0.3.3 is the same but specifies the VCS for cases where the VCS is something else than git
# vendor.sh git golang.org/x/sys eb2c74142fd19a79b3f237334c7384d5167b1b46 https://github.com/golang/sys.git vendor only golang.org/x/sys downloading from the specified URL
cd"$(dirname "$BASH_SOURCE")/.."
source'hack/.vendor-helpers.sh'
case$# in
0)
rm -rf vendor/
;;
# If user passed arguments to the script
1)
path="$PWD/hack/vendor.sh"
if ! cloneGrep="$(grep -E "^clone [^ ]+ $1""$path")";then
echo >&2"error: failed to find 'clone ... $1' in $path"