-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·38 lines (35 loc) · 808 Bytes
/
install.sh
File metadata and controls
executable file
·38 lines (35 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env bash
# SPDX-License-Identifier: Apache-2.0 OR MIT
set -CeEuo pipefail
IFS=$'\n\t'
export CARGO_NET_RETRY=10
args=(
-f "${INPUT_TOOL}"
--root "${RUNNER_TOOL_CACHE}/${INPUT_TOOL}"
)
if [[ -n "${INPUT_LOCKED}" ]]; then
args+=("${INPUT_LOCKED}")
fi
if [[ -n "${INPUT_FEATURES_FLAG}" ]]; then
args+=("${INPUT_FEATURES_FLAG}")
fi
if [[ -n "${INPUT_NO_DEFAULT_FEATURES_FLAG}" ]]; then
args+=("${INPUT_NO_DEFAULT_FEATURES_FLAG}")
fi
if [[ -n "${INPUT_ALL_FEATURES_FLAG}" ]]; then
args+=("${INPUT_ALL_FEATURES_FLAG}")
fi
if [[ -n "${INPUT_GIT}" ]]; then
args+=(--git "${INPUT_GIT}")
if [[ -n "${INPUT_TAG}" ]]; then
args+=(--tag "${INPUT_TAG}")
else
args+=(--rev "${INPUT_REV}")
fi
else
args+=(--version "${INPUT_VERSION}")
fi
(
set -x
cargo install "${args[@]}"
)