fix automatic dependency install on Debian

This commit is contained in:
Lephenixnoir 2021-01-03 17:37:50 +01:00
parent e1b68386ad
commit aec11eb598
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ ARCHIVE=$(basename "$URL")
if command -v apt >/dev/null 2>&1; then
deps="libmpfr-dev libmpc-dev libgmp-dev libpng-dev libppl-dev flex g++ git texinfo xz-utils"
pm=apt
pm_has="apt show"
pm_has="dpkg -s"
pm_install="sudo apt install"
elif command -v pacman >/dev/null 2>&1; then
deps="mpfr mpc gmp libpng ppl flex gcc git texinfo xz"
@ -35,11 +35,11 @@ fi
if [[ ! -z "$missing" ]]; then
echo "$TAG Based on $pm, some dependencies are missing: $missing"
echo -n "$TAG Do you want to run '$pm_install' to install them (Y/n)? "
echo -n "$TAG Do you want to run '$pm_install $missing' to install them (Y/n)? "
read do_install
if [[ "$do_install" == "y" || "$do_install" == "Y" || "$do_install" == "" ]]; then
$pm_install
$pm_install $missing
else
echo "$TAG Skipping dependencies, hoping it will build anyway."
fi