File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change 2
2
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
# SPDX-License-Identifier: Apache-2.0 OR MIT
4
4
5
- set -o errexit
6
- set -o pipefail
7
- set -o nounset
5
+ set -eu
6
+
8
7
SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && pwd ) "
9
- RUST_DIR=$SCRIPT_DIR /..
10
- RMC_RUSTC=` find $RUST_DIR /build -name " rustc" -print | grep stage1`
11
- $RMC_RUSTC " $@ "
8
+ REPO_DIR=" $( dirname $SCRIPT_DIR ) "
9
+
10
+ shopt -s nullglob
11
+ RMC_CANDIDATES=(" $REPO_DIR " /build/* /stage1/bin/rustc)
12
+
13
+ if [[ ${# RMC_CANDIDATES[@]} -ne 1 ]]; then
14
+ echo " ERROR: Could not find RMC binary."
15
+ echo " Looked for: $REPO_DIR /build/*/stage1/bin/rustc"
16
+ echo " Was RMC successfully built first?"
17
+ exit 1
18
+ fi
19
+
20
+ " ${RMC_CANDIDATES[0]} " " $@ "
You can’t perform that action at this time.
0 commit comments