From a2efe79e270fb0a95d77a42e1361de4e52614a91 Mon Sep 17 00:00:00 2001 From: GuilhermeWerner <26710260+GuilhermeWerner@users.noreply.github.com> Date: Sun, 28 Feb 2021 20:40:00 -0300 Subject: [PATCH] Create Sample Instalation Scripts --- .gitignore | 1 + Bootstrap.ps1 | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++ Powershell.sh | 36 +++++++++++++++++++++ 3 files changed, 126 insertions(+) create mode 100644 Bootstrap.ps1 create mode 100644 Powershell.sh diff --git a/.gitignore b/.gitignore index e69de29..c776bdf 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +*.deb \ No newline at end of file diff --git a/Bootstrap.ps1 b/Bootstrap.ps1 new file mode 100644 index 0000000..c39b55c --- /dev/null +++ b/Bootstrap.ps1 @@ -0,0 +1,89 @@ +#!/usr/bin/env pwsh + +cd ~ + +# Windows + +if ($IsWindows) +{ + +} + +# Mac + +elseif ($IsMacOS) +{ + # Homebrew + + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + + # ZSH + + sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" + + git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" + + ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme" +} + +# Linux + +elseif ($IsLinux) +{ + # Base Dependencies + + sudo apt install git curl wget nano build-essential ffmpeg libssl-dev -y + + # ZSH + + sudo apt install zsh -y + + sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" + + git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" + + ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme" + + # GitHub CLI + + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0 + + sudo apt-add-repository https://cli.github.com/packages + + sudo apt update + + sudo apt install gh -y + + # Java + + sudo apt install default-jre default-jdk -y + + # Docker + + sudo apt update + + 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" + + sudo apt update + + apt-cache policy docker-ce + + sudo apt install docker-ce -y + + sudo systemctl status docker + + # Add User to Docker Group + + sudo usermod -aG docker ${USER} + + su - ${USER} + + id -nG + + # Pull Docker images + +} \ No newline at end of file diff --git a/Powershell.sh b/Powershell.sh new file mode 100644 index 0000000..5f2b0ff --- /dev/null +++ b/Powershell.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env sh + +cd ~ + +# Linux + +if [ "$(expr substr $(uname -s) 1 5)" = "Linux" ] +then + # Update System + + sudo apt update + sudo apt upgrade -y + + # Powershell + + sudo apt install wget apt-transport-https software-properties-common -y + + wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb + + sudo dpkg -i packages-microsoft-prod.deb + + sudo apt update + + sudo add-apt-repository universe + sudo add-apt-repository multiverse + + sudo apt update + + sudo apt-get install powershell -y + +# Mac + +elif [ "$(uname)" = "Darwin" ] +then + echo "Mac" +fi