-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0103bec
commit 105b9a2
Showing
3 changed files
with
69 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,47 +7,70 @@ set -e | |
TOTAL_STEPS=7 | ||
STEP=1 | ||
function step_msg { | ||
printf "\n\033[36;1m[%s/%s] %s...\033[0m\n" "$STEP" "$TOTAL_STEPS" "$1"; | ||
printf "\033[36;1m[%s/%s] %s...\033[0m\n" "$STEP" "$TOTAL_STEPS" "$1"; | ||
((STEP++)) | ||
} | ||
|
||
function title_msg { | ||
printf "\n%s\n" "$1"; | ||
printf "\033[35;1m%s\033[0m\n\n" "$1"; | ||
} | ||
|
||
function success_msg { | ||
printf "\n\033[32;1m%s\n\n" "$1"; | ||
} | ||
|
||
function error_msg { | ||
printf "\n\033[31;1m%s\n\n" "$1"; | ||
} | ||
|
||
|
||
# -- Getting Started ---------------------------------------------------------- | ||
|
||
printf "\n" | ||
echo "██████╗ ██████╗ ████████╗███████╗██╗██╗ ███████╗███████╗" | ||
echo "██╔══██╗██╔═══██╗╚══██╔══╝██╔════╝██║██║ ██╔════╝██╔════╝" | ||
echo "██║ ██║██║ ██║ ██║ █████╗ ██║██║ █████╗ ███████╗" | ||
echo "██║ ██║██║ ██║ ██║ ██╔══╝ ██║██║ ██╔══╝ ╚════██║" | ||
echo "██████╔╝╚██████╔╝ ██║ ██║ ██║███████╗███████╗███████║" | ||
echo "╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝" | ||
printf "\n" | ||
|
||
title_msg "This script will install your workspace." | ||
|
||
# -- Get some information ----------------------------------------------------- | ||
if [ "$CI" = true ] ; then | ||
[email protected] | ||
else | ||
printf "Please enter some information.\n" | ||
read -r -p "What is your email? " GIT_EMAIL | ||
printf "\n" | ||
fi | ||
|
||
title_msg "Please wait! It will configure your environment." | ||
title_msg "Please wait! It will configure your workspace." | ||
|
||
# -- Project folder ----------------------------------------------------------- | ||
step_msg "Creating the Projects folder" | ||
mkdir ~/Projects | ||
|
||
# -- Dependencies ------------------------------------------------------------- | ||
step_msg "Installing dependencies" | ||
brew install git stow | ||
brew install git stow >/dev/null | ||
|
||
# -- Dotfiles ----------------------------------------------------------------- | ||
step_msg "Setting up dotfiles" | ||
git clone https://github.com/YasminTeles/dotfiles.git ~/.dotfiles | ||
git clone https://github.com/YasminTeles/dotfiles.git ~/.dotfiles >/dev/null | ||
|
||
rm -rf ~/.gitconfig | ||
cd ~/.dotfiles | ||
stow --dotfiles git ssh brew | ||
|
||
# -- Productivity Apps --------------------------------------------------------- | ||
step_msg "Installing the productivity apps" | ||
brew bundle install --file=~/Brewfile | ||
brew bundle install --file=~/Brewfile >/dev/null | ||
|
||
# -- Oh My Zsh ----------------------------------------------------------------- | ||
step_msg "Installing the Oh My Zsh" | ||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended | ||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended >/dev/null | ||
rm -rf ~/.zshrc | ||
stow --dotfiles zsh | ||
echo "My current shell is $SHELL." | ||
|
@@ -59,16 +82,15 @@ git config --global user.email "$GIT_EMAIL" | |
# -- SSH Key ------------------------------------------------------------------- | ||
step_msg "Generating a new SSH key" | ||
rm -rf ~/.ssh/id_ed25519 ~/.ssh/id_ed25519.pub | ||
ssh-keygen -t ed25519 -C "$GIT_EMAIL" -f ~/.ssh/id_ed25519 -q -N "" | ||
eval "$(ssh-agent -s)" | ||
ssh-add ~/.ssh/id_ed25519 | ||
ssh-keygen -t ed25519 -C "$GIT_EMAIL" -f ~/.ssh/id_ed25519 -q -N "" >/dev/null | ||
eval "$(ssh-agent -s)" >/dev/null | ||
ssh-add ~/.ssh/id_ed25519 >/dev/null | ||
|
||
# -- Next Steps ---------------------------------------------------------------- | ||
echo -e "\n" | ||
title_msg "Next steps:" | ||
echo -e "- Run \033[1mmake ssh\033[0m to copy your SSH public Key and past it into your GitHub or GitLab account." | ||
echo -e "- Run \033[1mmake zsh\033[0m to change your shell to zsh mode." | ||
|
||
# -- Happy end ----------------------------------------------------------------- | ||
printf "\n\nSuccess: Everything is ready!" | ||
printf "\nHave a nice day!\n" | ||
success_msg "Everything is ready!" | ||
title_msg "Have a nice day!" |
This file contains 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