-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathremove.sh
63 lines (51 loc) · 1.38 KB
/
remove.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
echo -e "====================="
echo -e "Welcome to macOS Init"
echo -e "=====================\n"
msg() {
local message=$1
echo -e "✅ \033[0;32m${message}\033[0m"
}
warning() {
local message=$1
echo -e "📢 \033[38;5;208m${message}\033[0m"
}
abort() {
printf "❌ \033[0;31m%s\n\033[0m" "$@" >&2
exit 1
}
desktop_path="$HOME/Desktop"
system_ssh_folder="$HOME/.ssh"
pictures_folder="$HOME/Pictures"
macosinit_folder="$desktop_path/macosinit"
ssh_folder="$macosinit_folder/ssh"
gpg_folder="$macosinit_folder/gpg"
config_folder="$macosinit_folder/config"
zshrc_file="$HOME/.zshrc"
system_wallpapers_folder="$pictures_folder/Wallpapers"
wallpapers_folder="$macosinit_folder/wallpapers"
homebrew_packages="$config_folder/brew.txt"
system_config_folder="$HOME/.config"
fonts_folder="$macosinit_folder/fonts"
system_fonts_folder="$HOME/Library/Fonts"
OS="$(uname)"
if [[ "${OS}" == "Darwin" ]]
then
msg "macOS detected."
else
abort "macOS Init is only supported on macOS."
fi
#!/bin/bash
delete_vimrc() {
read -p "Are you sure you want to delete vimrc configurations? This action cannot be undone. (y/n): " confirmation
if [ "$confirmation" != "y" ]; then
warning "Aborted."
return 1
fi
if [ -f "$HOME/.vimrc" ]; then
rm -f "$HOME/.vimrc"
msg ".vimrc configuration has been deleted."
else
warning ".vimrc file does not exist. Skipping..."
fi
}
delete_vimrc