1 Star 0 Fork 0

nsyouran/depot_tools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ensure_bootstrap 1.70 KB
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/env bash
# Copyright 2017 The Chromium Authors. All rights reserved.
# 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.
# Export for other depot_tools scripts to re-use.
export DEPOT_TOOLS_DIR="${DEPOT_TOOLS_DIR:-$(dirname "${BASH_SOURCE[0]}")}"
# Test if this script is running under a MinGW install. If it is, we will
# hardcode the paths to Git where possible.
OUTPUT="$(uname | grep 'MINGW')"
MINGW=$?
base_dir="${DEPOT_TOOLS_DIR}"
if [ $MINGW != 0 ]; then
# Don't bootstrap Python 3 on windows, since it is already done by
# bootstrap/win_tools.bat.
if [ "X$DEPOT_TOOLS_BOOTSTRAP_PYTHON3" != "X0" ]; then
source "$base_dir/bootstrap_python3"
bootstrap_python3
fi
fi
# Sync CIPD-boostrapped packages.
source "$base_dir/cipd_bin_setup.sh"
cipd_bin_setup
# Sync "gsutil.py".
python3 "$base_dir/gsutil.py" -- version 1> /dev/null &
# Sync all the pylint versions.
for script in "$base_dir"/pylint-[0-9].[0-9]; do
# We have to silence stderr too because newer pylint versions will emit
# a spurious log to tell us what pylintrc file it's using. Ugh.
"$script" --version >/dev/null 2>&1 &
done
# Run bootstraps in parallel to help speed things up.
wait
# Cleanup.
find "$base_dir" -iname "*.pyc" -delete || true
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/nsyouran/depot_tools.git
git@gitee.com:nsyouran/depot_tools.git
nsyouran
depot_tools
depot_tools
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385