Browse Source

add yum / apt package manager detection

PHP-GTK3
yggverse 4 months ago
parent
commit
c1afa554b4
  1. 15
      INSTALL.sh

15
INSTALL.sh

@ -25,9 +25,20 @@ until [[ $INSTALL_SYSTEM_DEPENDENCIES =~ (y|n) ]]; do @@ -25,9 +25,20 @@ until [[ $INSTALL_SYSTEM_DEPENDENCIES =~ (y|n) ]]; do
read -rp "Install system dependencies? [y/n]: " -e INSTALL_SYSTEM_DEPENDENCIES
done
## @TODO check for package manager support
## Dependencies installation requested
if [[ $INSTALL_SYSTEM_DEPENDENCIES == "y" ]]; then
sudo apt install libpq-dev\
### Detect package manager
if [[ ! -z $(which apt) ]]; then
CMD_INSTALL="apt install"
elif [[ ! -z $(which yum) ]]; then
CMD_INSTALL="yum install"
else
echo "Package manager not supported!" && exit
fi
### Install dependencies
sudo $CMD_INSTALL libpq-dev\
bison\
libreadline-dev\
git\

Loading…
Cancel
Save