mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Run it in a subshell to avoid forking+execing another shell. Bug: 1469696 Change-Id: I173f18aa3bf2f181db261750f4e51422717886ce Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4753234 Commit-Queue: Mike Frysinger <vapier@chromium.org> Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
25 lines
679 B
Bash
25 lines
679 B
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.
|
|
|
|
function cipd_bin_setup {
|
|
local MYPATH="${DEPOT_TOOLS_DIR:-$(dirname "${BASH_SOURCE[0]}")}"
|
|
local ENSURE="$MYPATH/cipd_manifest.txt"
|
|
local ROOT="$MYPATH/.cipd_bin"
|
|
|
|
UNAME="${DEPOT_TOOLS_UNAME_S:-$(uname -s | tr '[:upper:]' '[:lower:]')}"
|
|
case $UNAME in
|
|
cygwin*)
|
|
ENSURE="$(cygpath -w $ENSURE)"
|
|
ROOT="$(cygpath -w $ROOT)"
|
|
;;
|
|
esac
|
|
|
|
(
|
|
source "$MYPATH/cipd" ensure \
|
|
-log-level warning \
|
|
-ensure-file "$ENSURE" \
|
|
-root "$ROOT"
|
|
)
|
|
}
|