1
0
Fork 0
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:
tytan652 2019-08-22 10:53:56 +02:00
parent 84eb332ef8
commit 0aad051f3a
2 changed files with 4 additions and 4 deletions

View file

@ -117,9 +117,9 @@ ynh_script_progression --message="Making install..." --weight=780
# Set right permissions # Set right permissions
chown -R "$app":"$app" $final_path chown -R "$app":"$app" $final_path
# Install rustup # Install rustup with the toolchain needed by bitwarden_rs
pushd $final_path 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 popd
export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin" export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin"

View file

@ -126,9 +126,9 @@ chown -R "$app":"$app" $final_path
if [ "$upgrade_type" == "UPGRADE_APP" ] if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
# Install rustup # Install rustup with the toolchain needed by bitwarden_rs
pushd $final_path 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 popd
export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin" export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin"