blob: 345c26d79e4bfb0c0b0b1289588329686da7fc88 [file] [log] [blame] [edit]
#!/bin/bash
# Uses CIPD to install the version of lucicfg pinned in the cipd.ensure file,
# and prints the path to the lucicfg executable to stdout.
#
# Intended to be executed by other scripts that need to ensure lucicfg 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/lucicfg"