Files
chromium_depot_tools/cipd_bin_setup.sh
Chris Nardi ab816ce8ff Fix depot_tools errors that cause runhooks to be inoperable for Cygwin
The vpython/CIPD work created some errors when attempting to build on
Cygwin. This patch fixes these errors by converting Cygwin paths to
Windows paths or using the depot_tools python instead of Cygwin python.

Bug:
Change-Id: Id62f59a357fa2937c7eb843bf306ef4303b0910e
Reviewed-on: https://chromium-review.googlesource.com/745727
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
2017-10-31 20:18:40 +00:00

23 lines
611 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=$(dirname "${BASH_SOURCE[0]}")
local ENSURE="$MYPATH/cipd_manifest.txt"
local ROOT="$MYPATH/.cipd_bin"
UNAME=`uname -s | tr '[:upper:]' '[:lower:]'`
case $UNAME in
cygwin*)
ENSURE="$(cygpath -w $ENSURE)"
ROOT="$(cygpath -w $ROOT)"
;;
esac
"$MYPATH/cipd" ensure \
-log-level warning \
-ensure-file "$ENSURE" \
-root "$ROOT"
}