rust/cargo.sh

23 lines
343 B
Bash
Raw Normal View History

#!/bin/bash
if [ -z $CHANNEL ]; then
export CHANNEL='release'
fi
pushd $(dirname "$0") >/dev/null
2020-09-16 16:46:02 +02:00
source scripts/config.sh
# read nightly compiler from rust-toolchain file
TOOLCHAIN=$(cat rust-toolchain)
popd >/dev/null
cmd=$1
shift
2020-09-29 18:41:59 +02:00
if [[ "$cmd" = "jit" ]]; then
cargo +${TOOLCHAIN} rustc $@ -- --jit
else
cargo +${TOOLCHAIN} $cmd $@
2020-09-29 18:41:59 +02:00
fi