Merge pull request #162 from rust-lang/fix/test-script

Fix test.sh --build
This commit is contained in:
antoyo 2022-04-23 21:32:20 -04:00 committed by GitHub
commit b30a8f31f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,6 +18,7 @@ flags=
gcc_master_branch=1
channel="debug"
func=all
build_only=0
while [[ $# -gt 0 ]]; do
case $1 in
@ -72,6 +73,10 @@ while [[ $# -gt 0 ]]; do
func=build_sysroot
shift
;;
"--build")
build_only=1
shift
;;
*)
echo "Unknown option $1"
exit 1
@ -89,7 +94,7 @@ else
cargo rustc $flags
fi
if [[ "$1" == "--build" ]]; then
if (( $build_only == 1 )); then
exit
fi