blob: 3227c565d763f485bc0f0780bebdae62a37b6b75 [file] [log] [blame]
David Burger234efd72020-02-26 17:34:47 -07001#!/bin/bash
Jack Neusb371b952021-10-07 17:34:45 +00002# Copyright 2021 The Chromium OS Authors. All rights reserved.
David Burger234efd72020-02-26 17:34:47 -07003# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
Jack Neusb8b00c42021-07-28 15:07:38 +00006# Setup a project.
7
Jack Neusb371b952021-10-07 17:34:45 +00008mkdir /tmp/setup_project 2>/dev/null
9cipd install -force -root /tmp/setup_project \
10 chromiumos/infra/setup_project/\$\{platform\} prod
11# If --checkout is not supplied, assume that this script is being run from
12# a checkout and infer the root.
13if [[ "$*" != *"-checkout"* ]]; then
14 set -- "$@" "-checkout=$(pwd)/../../"
15fi
16/tmp/setup_project/setup_project setup-project "$@"