Install libssl-dev if not

This commit is contained in:
Thomas Forgione 2018-09-26 18:30:54 +02:00
parent c988d8d5a1
commit 0975168f35
1 changed files with 19 additions and 1 deletions

View File

@ -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