blob: 0b50a2f4465d1021c09f39e6765a38be94c7694b [file] [log] [blame]
Alan Green73b365c2021-05-05 20:22:37 +10001#!/bin/bash
Alan Greene56b7ac2021-04-07 14:52:42 +10002
David Lattimore3b6faa22022-10-18 14:10:43 +11003# Copyright 2021 The ChromiumOS Authors
Alan Greene56b7ac2021-04-07 14:52:42 +10004# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6
Alan Green9bdd6662021-04-10 07:49:12 +10007set -o errexit
Alan Greene56b7ac2021-04-07 14:52:42 +10008
Alan Green73b365c2021-05-05 20:22:37 +10009PROJECT_ROOT=$(realpath "$(dirname "${BASH_SOURCE[0]}")"/..)
Alan Greene56b7ac2021-04-07 14:52:42 +100010
David Lattimore3e6d4f12022-07-18 11:58:13 +100011# If we're outside the chroot, rerun inside.
12if [ ! -e /etc/cros_chroot_version ] ; then
13 exec "${PROJECT_ROOT}/scripts/run-tool" "$0" "$@"
14fi
15
Dan Callaghan9c8c1b22022-01-06 13:47:57 +110016cd "${PROJECT_ROOT}"
Alan Greene56b7ac2021-04-07 14:52:42 +100017
Dan Callaghan9c8c1b22022-01-06 13:47:57 +110018scripts/pyrun -m soc.hps_soc "$@"