diff --git a/zsh/update.zsh b/zsh/update.zsh index 03cc5f9..922e7e2 100644 --- a/zsh/update.zsh +++ b/zsh/update.zsh @@ -48,7 +48,7 @@ update() { # Fedora based systems command -v dnf > /dev/null 2>&1 if [ $? -eq 0 ]; then - dnf upgrade + sudo dnf upgrade fi # Update rust if installed @@ -63,6 +63,24 @@ update() { cargo install-update --help > /dev/null 2>&1 if [ $? -ne 0 ]; then + + pkg-config --libs --cflags openssl > /dev/null 2>&1 + if [ $? -ne 0 ]; then + + # We need to install openssl + command -v apt > /dev/null 2>&1 + if [ $? -eq 0 ]; then + sudo apt install -y libssl-dev + fi + + # For fedora + command -v dnf > /dev/null 2>&1 + if [ $? -eq 0 ]; then + sudo dnf install openssl-devel + fi + + fi + echo "\033[32;1m=== Installing rust packages updater ===\033[0m" cargo install cargo-update fi