mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
add yum / apt package manager detection
This commit is contained in:
parent
ea13127100
commit
c1afa554b4
1 changed files with 38 additions and 27 deletions
15
INSTALL.sh
15
INSTALL.sh
|
|
@ -25,9 +25,20 @@ until [[ $INSTALL_SYSTEM_DEPENDENCIES =~ (y|n) ]]; do
|
||||||
read -rp "Install system dependencies? [y/n]: " -e INSTALL_SYSTEM_DEPENDENCIES
|
read -rp "Install system dependencies? [y/n]: " -e INSTALL_SYSTEM_DEPENDENCIES
|
||||||
done
|
done
|
||||||
|
|
||||||
## @TODO check for package manager support
|
## Dependencies installation requested
|
||||||
if [[ $INSTALL_SYSTEM_DEPENDENCIES == "y" ]]; then
|
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\
|
bison\
|
||||||
libreadline-dev\
|
libreadline-dev\
|
||||||
git\
|
git\
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue