fix automatic dependency install on Debian

This commit is contained in:
Lephenixnoir 2021-01-03 17:37:50 +01:00
parent e1b68386ad
commit aec11eb598
No known key found for this signature in database
GPG key ID: 1BBA026E13FC0495

View file

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