David Burger | 234efd7 | 2020-02-26 17:34:47 -0700 | [diff] [blame] | 1 | #!/bin/bash |
Jack Neus | b371b95 | 2021-10-07 17:34:45 +0000 | [diff] [blame^] | 2 | # Copyright 2021 The Chromium OS Authors. All rights reserved. |
David Burger | 234efd7 | 2020-02-26 17:34:47 -0700 | [diff] [blame] | 3 | # Use of this source code is governed by a BSD-style license that can be |
| 4 | # found in the LICENSE file. |
| 5 | |
Jack Neus | b8b00c4 | 2021-07-28 15:07:38 +0000 | [diff] [blame] | 6 | # Setup a project. |
| 7 | |
Jack Neus | b371b95 | 2021-10-07 17:34:45 +0000 | [diff] [blame^] | 8 | mkdir /tmp/setup_project 2>/dev/null |
| 9 | cipd 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. |
| 13 | if [[ "$*" != *"-checkout"* ]]; then |
| 14 | set -- "$@" "-checkout=$(pwd)/../../" |
| 15 | fi |
| 16 | /tmp/setup_project/setup_project setup-project "$@" |