vendor: add vendor-update.sh script

Change-Id: I0013f5619f8d68b00249deeb1aadff23b0eefa06
Reviewed-on: https://upspin-review.googlesource.com/17503
Reviewed-by: Rob Pike <r@golang.org>
diff --git a/vendor-update.sh b/vendor-update.sh
new file mode 100755
index 0000000..26794b4
--- /dev/null
+++ b/vendor-update.sh
@@ -0,0 +1,18 @@
+#!/bin/bash -e
+
+# vendor-update.sh updates the vendored copy of the upspin.io repository and
+# stages the result, ready for "git commit".
+
+# The dep command can be obtained with "go get github.com/golang/dep/cmd/dep".
+
+# Update the upspin.io package.
+dep ensure -update upspin.io
+# Remove any vendored packages we don't use.
+dep prune
+# Delete test files.
+find vendor -name '*_test.go' -delete
+# Delete Google Cloud JSON API schemas.
+find vendor -name '*-api.json' -delete
+
+git add vendor Gopkg.lock
+git gofmt