Ubuntu version for install

This commit is contained in:
Marwolf
2018-07-13 18:54:16 -04:00
parent 365f170f41
commit 9c2cddad33

View File

@@ -28,9 +28,49 @@ if [ "$install" == "1" ]; then
read os read os
if [ "$os" == "1" ]; then if [ "$os" == "1" ]; then
sudo apt-get update && sudo apt-get install git build-essential apt-transport-https ca-certificates curl software-properties-common -y
echo ""
echo "Which Ubuntu version are you running?"
echo ""
echo "${RED}1${NC} - 16.04"
echo "${RED}2${NC} - 16.10"
echo "${RED}3${NC} - 17.04"
echo "${RED}4${NC} - 17.10"
echo "${RED}5${NC} - 18.04"
echo "${RED}5${NC} - 18.10"
echo ""
read ubuntu
if [ "$ubuntu" == "1" ]; then
vers="xenial"
elif [ "$ubuntu" == "2" ]; then
vers="yakkety"
elif [ "$ubuntu" == "3" ]; then
vers="zesty"
elif [ "$ubuntu" == "4" ]; then
vers="artful"
elif [ "$ubuntu" == "5" ]; then
vers="bionic"
elif [ "$ubuntu" == "6" ]; then
vers="cosmic"
else
vers="bionic"
continue
fi
echo "Attempting to install Docker now"
echo ""
sudo apt update && install git build-essential apt-transport-https ca-certificates curl software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $vers stable"
sudo apt update && install docker-ce docker-compose -y
elif [ "$os" == "2" ]; then elif [ "$os" == "2" ]; then
su -c 'yum update && yum install git' su -c 'yum update && yum install git'
echo ""
echo "Attempting to install Docker now"
echo ""
curl -fsSL get.docker.com -o get-docker.sh
sudo sh get-docker.sh
elif [ "$os" == "3" ]; then elif [ "$os" == "3" ]; then
clear clear
echo "Do you have brew installed?" echo "Do you have brew installed?"
@@ -44,6 +84,12 @@ if [ "$install" == "1" ]; then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install git brew install git
else else
echo ""
echo "Attempting to install Docker now"
echo ""
curl -fsSL get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo apt install docker-compose
continue continue
fi fi
elif [ "$os" == "4" ]; then elif [ "$os" == "4" ]; then
@@ -51,11 +97,10 @@ if [ "$install" == "1" ]; then
echo "You will have to install Git manually then. Press enter to continue." echo "You will have to install Git manually then. Press enter to continue."
echo "" echo ""
read read
else
continue
fi
echo "Attempting to install Docker now" echo ""
echo "Attempting to install Docker now"
echo ""
curl -fsSL get.docker.com -o get-docker.sh curl -fsSL get.docker.com -o get-docker.sh
sudo sh get-docker.sh sudo sh get-docker.sh
sudo apt install docker-compose sudo apt install docker-compose
@@ -63,6 +108,16 @@ if [ "$install" == "1" ]; then
continue continue
fi fi
echo ""
echo "Attempting to install Docker now"
echo ""
curl -fsSL get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo apt install docker-compose
else
continue
fi
clear clear
echo "Checking the Docker Home git repo for any recent updates." echo "Checking the Docker Home git repo for any recent updates."
echo "" echo ""