From 792831e1760c470296d567cd26f2f625ac3df487 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 10 Jan 2025 09:41:28 -0800 Subject: [PATCH] ensure_bootstrap: basic argument processing Running with --help shouldn't actually do the bootstrap. Change-Id: Id481432cdfc23121e5b71cbe64ffb2068fea8e23 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6165754 Auto-Submit: Mike Frysinger Commit-Queue: Yiwei Zhang Reviewed-by: Yiwei Zhang --- ensure_bootstrap | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/ensure_bootstrap b/ensure_bootstrap index 22d9570fc0..3e8da6d602 100755 --- a/ensure_bootstrap +++ b/ensure_bootstrap @@ -4,16 +4,35 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -# This is a shell script to ensure that all of the "depot_tools" bootstrap -# programs are locally downloaded and ready for execution. -# -# Unlike "update_depot_tools", this script works with the current -# checkout, and will not update/sync the "depot_tools" repository. -# # TODO: This duplicates logic in "update_depot_tools". Update that script to # invoke this script instead of manually calling "cipd_bin_setup" and other # operations. +usage() { + cat <&2 + exit 1 + ;; + esac +fi + # Export for other depot_tools scripts to re-use. export DEPOT_TOOLS_DIR="${DEPOT_TOOLS_DIR:-$(dirname "${BASH_SOURCE[0]}")}"