blob: dc2add8066cbb07713990b1ab003049998d69962 [file] [log] [blame]
#!/bin/bash
# Uses CIPD to install the version of black pinned in the cipd.ensure file,
# and prints the path to the black executable to stdout.
#
# Intended to be executed by other scripts that need to ensure black is
# installed.
set -o errexit
set -o pipefail
cd "$(dirname "${BASH_SOURCE[0]}")/.."
cipd_dir="$(pwd)/.cipd"
ensure_file="$(pwd)/cipd.ensure"
cipd ensure -root "$cipd_dir" -ensure-file "$ensure_file" -log-level error
echo "$cipd_dir/black"