diff --git a/bin/update b/bin/update index 6705523..017806d 100755 --- a/bin/update +++ b/bin/update @@ -198,45 +198,8 @@ update-rust() { # Program to update cargo programs is not installed if [ $? -ne 0 ]; then - # This program requires openssl, so check that it is installed - pkg-config --libs --cflags openssl > /dev/null 2>&1 - local installed_openssl=$? + echo -e "\033[33;1m=== To allow updating rust packages, run \`cargo install install-update\`===\033[0m" - # We need to install openssl - if [ $installed_openssl -ne 0 ]; then - - # If the user has root power - if [ ! -f ~/.config/dotfiles/.data/noroot ]; then - - echo -e "\033[32;1m=== libssl-dev is needed to update rust packages ===\033[0m" - sudo true - - if [ $? -eq 0 ]; then - - # For ubuntu - command -v apt > /dev/null 2>&1 - if [ $? -eq 0 ]; then - sudo apt install -y libssl-dev - installed_openssl=0 - fi - - # For fedora - command -v dnf > /dev/null 2>&1 - if [ $? -eq 0 ]; then - sudo dnf install openssl-devel - installed_openssl=0 - fi - - fi - - fi - fi - - # Only try to install if openssl is installed - if [ $installed_openssl -eq 0 ]; then - echo -e "\033[32;1m=== Installing rust packages updater ===\033[0m" - cargo install cargo-update - fi fi # If the user has no root, and if he doesn't have openssl, we won't install cargo update.