File tree Expand file tree Collapse file tree 4 files changed +37
-24
lines changed Expand file tree Collapse file tree 4 files changed +37
-24
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ pipeline {
72
72
73
73
sh """ #!/bin/bash
74
74
# Install dependencies
75
- #./scripts/deps.sh
75
+ #./scripts/install- deps.sh
76
76
. "${ HOME} /.cargo/env"
77
77
78
78
# Reset
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ For a list of important changes please see the [changelog](./CHANGELOG.md).
32
32
33
33
Dependencies can be installed with the provided script.
34
34
35
- ```
36
- ./scripts/deps.sh
35
+ ``` sh
36
+ ./scripts/install- deps.sh
37
37
```
38
38
39
39
If rustup was installed for the first time, it will be required to source the
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
+ # SPDX-License-Identifier: GPL-3.0-only
2
3
3
4
set -eE
4
5
@@ -101,22 +102,8 @@ curl -sSf https://review.coreboot.org/tools/hooks/commit-msg \
101
102
-o .git/modules/coreboot/hooks/commit-msg && \
102
103
chmod +x .git/modules/coreboot/hooks/commit-msg
103
104
104
- RUSTUP_NEW_INSTALL=0
105
- if which rustup & > /dev/null; then
106
- msg " Updating rustup"
107
- rustup self update
108
- else
109
- RUSTUP_NEW_INSTALL=1
110
- msg " Installing Rust"
111
- curl --proto ' =https' --tlsv1.2 -sSf https://sh.rustup.rs \
112
- | sh -s -- -y --default-toolchain stable
113
-
114
- msg " Loading Rust environment"
115
- source " ${HOME} /.cargo/env"
116
- fi
117
-
118
- msg " Installing pinned Rust toolchain and components"
119
- rustup show
105
+ msg " Installing Rust toolchain and components"
106
+ ./scripts/install-rust.sh
120
107
121
108
msg " Installing EC dependencies"
122
109
pushd ec
@@ -129,10 +116,5 @@ make CPUS="$(nproc)" crossgcc-i386
129
116
make CPUS=" $( nproc) " crossgcc-x64
130
117
popd
131
118
132
- if [[ $RUSTUP_NEW_INSTALL = 1 ]]; then
133
- msg " \x1B[33m>> rustup was just installed. Ensure cargo is on the PATH with:"
134
- echo -e " source ~/.cargo/env\n"
135
- fi
136
-
137
119
msg " \x1B[32mSuccessfully installed dependencies"
138
120
echo " Ready to run ./scripts/build.sh [model]" >&2
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ # SPDX-License-Identifier: GPL-3.0-only
3
+
4
+ # Install Rust via rustup, along with the pinned toolchain.
5
+
6
+ # shellcheck shell=dash
7
+ # shellcheck disable=SC1091
8
+
9
+ set -Ee
10
+
11
+ RUSTUP_NEW_INSTALL=0
12
+
13
+ # NOTE: rustup is used to allow multiple toolchain installations.
14
+ if command -v rustup > /dev/null 2>&1 ; then
15
+ rustup self update
16
+ else
17
+ RUSTUP_NEW_INSTALL=1
18
+ curl --proto ' =https' --tlsv1.2 -sSf https://sh.rustup.rs \
19
+ | sh -s -- -y --default-toolchain stable
20
+
21
+ . " ${HOME} /.cargo/env"
22
+ fi
23
+
24
+ # XXX: rustup has no command to install a toolchain from a TOML file.
25
+ # Rely on the fact that `show` will install the default toolchain.
26
+ rustup show
27
+
28
+ if [ " $RUSTUP_NEW_INSTALL " = " 1" ]; then
29
+ printf " \e[33m>> rustup was just installed. Ensure cargo is on the PATH with:\e[0m\n"
30
+ printf " source ~/.cargo/env\n\n"
31
+ fi
You can’t perform that action at this time.
0 commit comments