configure

39 lines | 1.402 kB Blame History Raw Download
#!/bin/bash

if [ "$(whoami)" != 'root' ]; then
    echo "You have no permission to run $0 as non-root user."
    exit 1;
fi

if [ -z $1 ]; then
	apt-get update -qq

	apt-get -qq -y install software-properties-common

	add-apt-repository ppa:linuxuprising/java -y

	apt-get update -qq

	echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
	echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections
	echo debconf shared/accepted-oracle-license-v1-2 select true | debconf-set-selections
	echo debconf shared/accepted-oracle-license-v1-2 seen true | debconf-set-selections
	apt-get -qq -y install oracle-java12-installer
	apt-get -qq -y install maven
	apt-get -qq -y install git
	apt-get -qq -y install htop

	apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y
	curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
	add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
	apt-get update
	apt-get install docker-ce docker-ce-cli containerd.io -y

	curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
	chmod +x /usr/local/bin/docker-compose
fi

cd adapters; bash configure $1 $2 cd ..
cd approaches; bash configure $1 $2 cd ..
cd applications; bash configure $1 $2 cd ..
wait