forked from Emurgo/yoroi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathget_rust.sh
More file actions
executable file
·33 lines (28 loc) · 775 Bytes
/
get_rust.sh
File metadata and controls
executable file
·33 lines (28 loc) · 775 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
#!/bin/bash
if [ -f $HOME/.cargo/env ]
then
source $HOME/.cargo/env
echo "Rustup is already installed"
else
# install rustup
curl https://sh.rustup.rs -sSf | sh -s -- -y
source $HOME/.cargo/env
# use 1.41.0 version.
rustup install 1.41.0
# cargo-lipo required only for ios build
if [ -z "$YOROI_ANDROID_BUILD" ]
then
rustup target add aarch64-apple-ios armv7-apple-ios armv7s-apple-ios x86_64-apple-ios i386-apple-ios
cargo install cargo-lipo
else
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
fi
if [[ -z "$BASH_ENV" ]]
then
echo "$BASH_ENV not set. Rust not added to $PATH"
else
echo 'export PATH=$HOME/.cargo/bin/:$PATH' >> $BASH_ENV
fi
export
cargo
fi