ssh_client: checkout depot_tools on demand

Not everyone has depot_tools in their PATH, so grab an up-to-date copy
ourselves so we can download the webports code.

Change-Id: I372f6e3a338a19b12a6dd377ec9599f6544b55cd
Reviewed-on: https://chromium-review.googlesource.com/956300
Reviewed-by: Vitaliy Shipitsyn <vsh@google.com>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/ssh_client/build.sh b/ssh_client/build.sh
index d0a6b77..470b993 100755
--- a/ssh_client/build.sh
+++ b/ssh_client/build.sh
@@ -51,6 +51,12 @@
 if [[ ($WEB_PORTS == "") || !(-d $WEB_PORTS) ]]; then
   pushd output
   if [[ !(-d webports/src) ]]; then
+    # Get own copy of depot_tools for gclient.
+    if [[ ! -d depot_tools ]]; then
+      git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
+    fi
+    PATH="${PWD}/depot_tools:${PATH}"
+
     rm -rf webports && mkdir webports
     cd webports
     gclient config --name=src https://chromium.googlesource.com/webports.git