mirror of
https://github.com/YunoHost-Apps/vaultwarden_ynh.git
synced 2024-09-03 18:26:31 +02:00
perf: make the scripts only install one toolchain
install and upgrade scripts will install the last nightly toolchain, but bitwarden_rs have a rust-toochain file that causes another toolchain to be installed if they differ. Then the toolchain specified in the rust-toochain file is now installed as default toolchain
This commit is contained in:
parent
84eb332ef8
commit
0aad051f3a
2 changed files with 4 additions and 4 deletions
|
@ -117,9 +117,9 @@ ynh_script_progression --message="Making install..." --weight=780
|
|||
# Set right permissions
|
||||
chown -R "$app":"$app" $final_path
|
||||
|
||||
# Install rustup
|
||||
# Install rustup with the toolchain needed by bitwarden_rs
|
||||
pushd $final_path
|
||||
sudo -u "$app" RUSTUP_HOME=$final_path/.rustup CARGO_HOME=$final_path/.cargo bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain=nightly'
|
||||
sudo -u "$app" RUSTUP_HOME=$final_path/.rustup CARGO_HOME=$final_path/.cargo bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain=$(cat build/rust-toolchain)'
|
||||
popd
|
||||
|
||||
export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin"
|
||||
|
|
|
@ -126,9 +126,9 @@ chown -R "$app":"$app" $final_path
|
|||
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
# Install rustup
|
||||
# Install rustup with the toolchain needed by bitwarden_rs
|
||||
pushd $final_path
|
||||
sudo -u "$app" RUSTUP_HOME=$final_path/.rustup CARGO_HOME=$final_path/.cargo bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain=nightly'
|
||||
sudo -u "$app" RUSTUP_HOME=$final_path/.rustup CARGO_HOME=$final_path/.cargo bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain=$(cat build/rust-toolchain)'
|
||||
popd
|
||||
|
||||
export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin"
|
||||
|
|
Loading…
Reference in a new issue