From b27d7c993a535ff61988a897eaf752611e4e421d Mon Sep 17 00:00:00 2001 From: Taylor Bockman Date: Fri, 10 Jun 2016 12:56:14 -0700 Subject: [PATCH] Add internet detection to ubuntu script, add python tools installing for neovim --- ubuntu/installer.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ubuntu/installer.sh b/ubuntu/installer.sh index 99d63cf..cfed792 100644 --- a/ubuntu/installer.sh +++ b/ubuntu/installer.sh @@ -2,6 +2,15 @@ # Tested on Ubuntu 16.04 LTS echo "======== UBUNTU AUTO-INSTALL SCRIPT ========" + +echo "Checking for internet connection..." +nc -z 8.8.8.8 53 >/dev/null 2>&1 +online=$? +if [ $online -ne 0 ]; then + echo "No internet connection detected! Please enable an internet connection before continuing." + exit +fi + # Pre-setup echo "Running pre-setup..." sudo add-apt-repository ppa:neovim-ppa/unstable @@ -43,6 +52,7 @@ sudo apt-get -qq -y install python-dev sudo apt-get -qq -y install python-pip sudo apt-get -qq -y install python3-dev sudo apt-get -qq -y install python3-pip +sudo apt-get -qq -y install python3-setuptools sudo apt-get -qq -y install m4 sudo apt-get -qq -y install ocaml sudo apt-get -qq -y install aspcud @@ -53,6 +63,9 @@ echo "Installing editors..." sudo apt-get -qq -y install vim sudo apt-get -qq -y install neovim +echo "Installing python tools for neovim..." +sudo pip install neovim + # Terminals echo "Installing terminal..." sudo apt-get -qq -y rxvt-unicode