Created
August 29, 2024 04:57
-
-
Save robsonrosa/f6f3984b4ec23be951fd6856edc23012 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| read -p "Your name: " GIT_NAME | |
| read -p "Your git account e-mail: " GIT_EMAIL | |
| read -p "Your setup repo ssh URL: [[email protected]:robsonrosa/ubuntu-setup.git]" SETUP_REPO_URL | |
| read -p "Setup root path [$HOME/code]: " SETUP_ROOT_PATH | |
| SETUP_REPO_URL=${SETUP_REPO_URL:-"[email protected]:robsonrosa/ubuntu-setup.git"} | |
| SETUP_ROOT_PATH=${SETUP_ROOT_PATH:-"$HOME/code"} | |
| ssh-keygen -t ed25519 -C "$GIT_EMAIL" | |
| echo "Copy the pub key and place on git tool" | |
| echo "--------------------------------------" | |
| cat $HOME/.ssh/id_ed25519.pub | |
| echo "--------------------------------------" | |
| read -p "Press enter to continue" | |
| sudo apt update | |
| sudo apt install git -y | |
| git config --global user.email $GIT_EMAIL | |
| git config --global user.name $GIT_NAME | |
| mkdir -p $SETUP_ROOT_PATH && cd $SETUP_ROOT_PATH | |
| SETUP_REPO_PATH=$(echo $SETUP_REPO_URL | sed 's%^.*/\([^/]*\)\.git$%\1%g') | |
| rm -rfv $SETUP_REPO_PATH | |
| git clone $SETUP_REPO_URL | |
| cd $SETUP_REPO_PATH | |
| wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
| sudo apt install -y ./google-chrome*.deb && rm google-chrome*.deb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment