rust/scripts/cargo.sh

17 lines
283 B
Bash
Raw Normal View History

#!/bin/bash
dir=$(dirname "$0")
source "$dir/config.sh"
# read nightly compiler from rust-toolchain file
TOOLCHAIN=$(cat "$dir/rust-toolchain")
cmd=$1
shift || true
2020-09-29 18:41:59 +02:00
if [[ "$cmd" = "jit" ]]; then
cargo "+${TOOLCHAIN}" rustc "$@" -- --jit
2020-09-29 18:41:59 +02:00
else
cargo "+${TOOLCHAIN}" "$cmd" "$@"
2020-09-29 18:41:59 +02:00
fi