From 7f7195eadf2ba7a1c3e5b07c5269250598b0c76e Mon Sep 17 00:00:00 2001 From: Dustin B Date: Tue, 31 Jul 2018 16:56:01 -0400 Subject: [PATCH] Repo Check fo Multiverse --- xo_install.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xo_install.sh b/xo_install.sh index 5686763..e81a6fb 100644 --- a/xo_install.sh +++ b/xo_install.sh @@ -1,9 +1,11 @@ #!/bin/bash #Repository add - confirm required repoistor(ies) are enabled and active, update and upgrade no matter what -add-apt-repository multiverse -sudo apt update -sudo apt upgrade +multiverse="http://archive.ubuntu.com/multiverse" +if ! grep -q "^deb .*$multiverse" /etc/apt/sources.list; +then + sudo add-apt-repository multiverse + else # Check if we were effectively run as root [ $EUID = 0 ] || { echo "This script needs to be run as root!"; exit 1; } @@ -89,4 +91,4 @@ fi echo "" echo "" echo "Installation complete, open a browser to:" && hostname -I && echo "" && echo "Default Login:"admin@admin.net" Password:"admin"" && echo "" && echo "Don't forget to change your password!" - +fi