]> git.lizzy.rs Git - rust.git/blob - cargo.sh
Prefer numeric associated constants in example
[rust.git] / cargo.sh
1 #!/bin/bash
2
3 if [ -z $CHANNEL ]; then
4 export CHANNEL='release'
5 fi
6
7 pushd $(dirname "$0") >/dev/null
8 source scripts/config.sh
9
10 # read nightly compiler from rust-toolchain file
11 TOOLCHAIN=$(cat rust-toolchain)
12
13 popd >/dev/null
14
15 cmd=$1
16 shift
17
18 if [[ "$cmd" = "jit" ]]; then
19 cargo +${TOOLCHAIN} rustc $@ -- --jit
20 else
21 cargo +${TOOLCHAIN} $cmd $@
22 fi