Check for toolchain binaries explicitly

Currently, the check for toolchain existence is very broad, and passes
when the toolchain is not downloaded (because the kernel headers might
be downloaded, and the toolchain and kernel headers are downloaded to
the same location). Let's update this check to be more specific such
that it fails when the toolchain is not downloaded.

BUG=b/207547270
TEST=Run scripts/run_installer.sh with a test container with version
460.32.03.

Change-Id: I3a2b55c12abf046675484a25fa0fc58836e39b98
Reviewed-on: https://cos-review.googlesource.com/c/cos/tools/+/25560
Tested-by: Robert Kolchmeyer <rkolchmeyer@google.com>
Reviewed-by: Arnav Kansal <rnv@google.com>
Cloud-Build: GCB Service account <228075978874@cloudbuild.gserviceaccount.com>
diff --git a/src/cmd/cos_gpu_installer_v1/cos-gpu-installer-docker/entrypoint.sh b/src/cmd/cos_gpu_installer_v1/cos-gpu-installer-docker/entrypoint.sh
index ddf0040..608598e 100755
--- a/src/cmd/cos_gpu_installer_v1/cos-gpu-installer-docker/entrypoint.sh
+++ b/src/cmd/cos_gpu_installer_v1/cos-gpu-installer-docker/entrypoint.sh
@@ -317,7 +317,7 @@
 # Download, extracts and install the toolchain package
 install_cross_toolchain_pkg() {
   info "$TOOLCHAIN_PKG_DIR: $(ls -A "${TOOLCHAIN_PKG_DIR}")"
-  if [[ -n "$(ls -A "${TOOLCHAIN_PKG_DIR}")" ]]; then
+  if [[ -n "$(ls -A "${TOOLCHAIN_PKG_DIR}/bin")" ]]; then
     info "Found existing toolchain package. Skipping download and installation"
     if mountpoint -q "${TOOLCHAIN_PKG_DIR}"; then
       info "${TOOLCHAIN_PKG_DIR} is a mountpoint; remounting as exec"