-
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
d26a0ab
commit 60c91d0
Showing
3 changed files
with
75 additions
and
3 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
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/bash | ||
|
||
# Tells the shell script to exit if it encounters an error | ||
set -e | ||
|
||
# Print a step description | ||
TOTAL_STEPS=5 | ||
STEP=1 | ||
function step_msg { | ||
printf "\n[$STEP/$TOTAL_STEPS] $1...\n"; | ||
((STEP++)) | ||
} | ||
|
||
echo "This script will remove all configurations of the environment." | ||
read -p "Are you sure you want to proceed? (y/n) " CONFIRM | ||
|
||
if [[ $CONFIRM == [yY] || $CONFIRM == [yY][eE][sS] ]] | ||
then | ||
printf "\nPlease wait! Proceeding with the removal of all configurations...\n" | ||
|
||
# -- Symlinks ---------------------------------------------------------------- | ||
step_msg "Removing all symlinks" | ||
cd ~/.dotfiles && stow --dotfiles -D git ssh brew zsh | ||
|
||
# -- Project folder ---------------------------------------------------------- | ||
step_msg "Removing the Project directory" | ||
rm -rf ~/Projects | ||
|
||
# -- SSH Key ----------------------------------------------------------------- | ||
step_msg "Removing SSH Keys" | ||
rm -rf ~/.ssh/id_ed25519 ~/.ssh/id_ed25519.pub | ||
|
||
# -- Productivity Apps ------------------------------------------------------- | ||
step_msg "Removing all productivity apps" | ||
rm -rf ~/.oh-my-zsh | ||
brew uninstall --force $(brew list) | ||
|
||
# -- Dotfiles ---------------------------------------------------------------- | ||
step_msg "Removing Dotfiles directory" | ||
rm -rf ~/.dotfiles | ||
|
||
# -- Happy end ----------------------------------------------------------------- | ||
printf "\nAll configurations have been removed." | ||
|
||
else | ||
printf "\nOperation cancelled." | ||
fi | ||
|
||
printf "\nHave a nice day!\n" | ||
|