Skip to content

Commit

Permalink
updated script
Browse files Browse the repository at this point in the history
  • Loading branch information
shitwolfymakes committed Jun 1, 2022
1 parent fa58e69 commit 53073bb
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions scripts/installers/ubuntu-20.04-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

set -eo pipefail

RED='\033[1;31m'
NC='\033[0m' # No Color
PORT=8080

function usage() {
echo -e "\nUsage: ubuntu-20.04-install.sh [OPTIONS]"
echo -e "\t-d\t\tInstall the ARM Development Environment"
echo -e "\t-p [PORT]\tOverwrite the default WEBSERVER_PORT"
echo -e " -d \tInstall the ARM Development Environment"
echo -e " -p <port>\tSpecify the port arm will serve on. \n\t\tDefault is \"$PORT\""
}

RED='\033[1;31m'
NC='\033[0m' # No Color

dev_env_flag=
port_flag=
PORT=8080
while getopts 'dp:' OPTION
do
case $OPTION in
Expand All @@ -25,11 +25,11 @@ do
if ! [[ $PORT -gt 0 && $PORT -le 65535 ]]; then
echo -e "\nERROR: ${PORT} is not a port"
usage
exit 1
exit 2
fi
;;
?) usage
exit 2
exit 1
;;
esac
done
Expand Down Expand Up @@ -136,13 +136,14 @@ function install_arm_dev_env() {
clone_arm

# install docker
sudo apt install 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 focal stable" -y
apt-cache policy docker-ce
sudo apt update -y
sudo apt install docker-ce docker-ce-cli containerd.io -y
sudo usermod -aG docker arm
if [ -e /usr/bin/docker ]; then
echo -e "${RED}Docker installation detected, skipping...${NC}"
else
echo -e "${RED}Installing Docker${NC}"
# the convenience script auto-detects OS and handles install accordingly
curl -sSL https://get.docker.com | bash
sudo usermod -aG docker arm
fi

# install pycharm community, if professional not installed already
if [[ -z $(snap find pycharm-professional) ]]; then
Expand Down

0 comments on commit 53073bb

Please sign in to comment.