blob: c032a41cf780573d93721dd2c5a7b9afb73c079e [file] [log] [blame] [edit]
#!/bin/bash
# Copyright 2025 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -e
set -o pipefail
function usage {
cat <<EOF
Usage:
$(basename "$0") <builder_name> <clang_cas_instance_digest>
Example:
$(basename "$0") core.x64-lto 80bdc18f881e761d36894091af27838f32b66a4e09b211056fc10fdf7c0feb63/578
EOF
} # end usage
if [[ "$#" -ne 2 ]]; then
echo "Error: Incorrect number of arguments. Expected <builder_name> and <clang_cas_instance_digest>." >&2
usage
exit 1
fi
readonly BUILDER=$1
readonly DIGEST=$2
led get-builder fuchsia/try:$BUILDER | \
led edit -p '$fuchsia/checkout'='{
"clang_toolchain": {
"cas_digest": "'$DIGEST'"
}
}' | \
led edit-system -p 20 | led launch