We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7816a6a commit bc34b46Copy full SHA for bc34b46
wrappers/cargo-rel
@@ -0,0 +1,30 @@
1
+#!/bin/bash
2
+
3
+cargo=(
4
+ cargo
5
+ --config "$HOME/.cargo/config-rel.toml"
6
+)
7
8
+while (( $# )); do
9
+ case "$1" in
10
+ run|build|check|rustc|install)
11
+ cargo+=( "$1" --profile=release )
12
+ shift
13
+ break ;;
14
+ --profile*|--release|--dev)
15
+ # if there is a user profile provided, do not ever attempt to
16
+ # override it
17
18
+ --)
19
+ # if we got to -- without seeing the command, append --release
20
+ # into the last possible position and bail
21
+ cargo+=( --profile=release )
22
23
+ *)
24
+ cargo+=( "$1" )
25
+ shift ;;
26
+ esac
27
+done
28
29
+set -x
30
+exec "${cargo[@]}" "$@"
0 commit comments