small tweaks to fix/cleanup install.sh

This commit is contained in:
Blake Harnden 2020-03-05 11:44:13 -08:00
parent f826a4c5e8
commit 105dd4ad7b

View file

@ -7,10 +7,6 @@ function install_python_depencencies() {
sudo python3 -m pip install -r daemon/requirements.txt
}
function install_python_dev_dependencies() {
sudo python3 -m pip install pipenv grpcio-tools
}
function install_ospf_mdr() {
rm -rf /tmp/ospf-mdr
git clone https://github.com/USNavalResearchLaboratory/ospf-mdr /tmp/ospf-mdr
@ -42,8 +38,6 @@ function install_dev_core() {
sudo make install
cd -
cd daemon
pipenv install --dev
cd -
}
# detect os/ver for install type
@ -70,8 +64,12 @@ shift $((OPTIND - 1))
case ${os} in
"ubuntu")
echo "Installing CORE for Ubuntu"
sudo apt install -y automake pkg-config gcc libev-dev ebtables gawk iproute2 \
python3.6 python3.6-dev python3-pip python3-tk tk libtk-img ethtool libtool libreadline-dev autoconf
echo "installing core system dependencies"
sudo apt install -y automake pkg-config gcc libev-dev ebtables iproute2 \
python3.6 python3.6-dev python3-pip python3-tk tk libtk-img ethtool autoconf
python3 -m pip install grpcio-tools
echo "installing ospf-mdr system dependencies"
sudo apt install -y libtool gawk libreadline-dev
install_ospf_mdr
if [[ -z ${dev} ]]; then
echo "normal install"
@ -80,23 +78,32 @@ case ${os} in
install_core
else
echo "dev install"
install_python_dev_dependencies
python3 -m pip install pipenv
build_core
install_dev_core
python3 -m pipenv install --dev
fi
;;
"centos")
echo "Installing CORE for CentOS"
echo "installing core system dependencies"
sudo yum install -y automake pkgconf-pkg-config gcc gcc-c++ libev-devel iptables-ebtables iproute \
python36 python36-devel python3-pip python3-tkinter tk ethtool libtool readline-devel autoconf gawk
python36 python36-devel python3-pip python3-tkinter tk ethtool autoconf
python3 -m pip install grpcio-tools
echo "installing ospf-mdr system dependencies"
sudo apt install -y libtool gawk readline-devel
install_ospf_mdr
if [[ -z ${dev} ]]; then
echo "normal install"
install_python_depencencies
build_core --prefix=/usr
install_core
else
install_python_dev_dependencies
echo "dev install"
sudo python3 -m pip install pipenv
build_core --prefix=/usr
install_dev_core
sudo python3 -m pipenv install --dev
fi
;;
*)