-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·151 lines (147 loc) · 5.1 KB
/
install.sh
File metadata and controls
executable file
·151 lines (147 loc) · 5.1 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#!/usr/bin/env bash
# Check Requirements
requirements_list=("zsh" "git" "curl" "rsync")
for i in "${requirements_list[@]}"; do
if ! [ "$(command -v "$i")" ]; then
echo "$i not installed. Install it and then run the script."
exit 1
fi
done
# Create installation files/directories
source sync-functions.sh
mkdir "$HOME"/.dotfiles_backups "$HOME"/terminal-utilities
# Menu
printf "Hello! This is the KDotfiles Dotfile Selection Menu:\n"
while true; do
printf "Choose Dotfiles to Install/Sync:\n"
printf " ,1. gnupg,2. zsh,3. git,4. vim,5. bin\n,6. npmrc,7. bat,8. lazygit,9. lsd,10. poetry\n,11. ngrok,12. starship,13. topgrade,14. amfora,15. zellij\n,16. ghostty,17. superfile,18. templates,19. Gnome Extensions,20 Rio Term\n,21. all" | column --table -s ","
read -rp "Choose dotfiles [1-17/q](comma-separated): " CHOOSE
IFS="," read -ra CHOOSE_ARRAY <<< "$CHOOSE"
for i in "${CHOOSE_ARRAY[@]}"; do
if [ "$i" -eq "1" ]; then
if [ "$(command -v gpg)" ]; then
sync_gnupg
else
echo "GPG is not installed. Skipping."
fi
elif [ "$i" -eq "2" ]; then
if [ "$(command -v zsh)" ]; then
sync_zshrc
sync_zsh_scripts
else
echo "zsh is not installed. Skipping."
fi
elif [ "$i" -eq "3" ]; then
if [ "$(command -v git)" ]; then
sync_git_files
else
echo "git is not installed. Skipping."
fi
elif [ "$i" -eq "4" ]; then
if [ "$(command -v vim)" ]; then
sync_vim_config
else
echo "vim is not installed. Skipping."
fi
elif [ "$i" -eq "5" ]; then
sync_bin_dir
elif [ "$i" -eq "6" ]; then
if [ "$(command -v npm)" ]; then
sync_npm
else
echo "npm is not installed. Skipping."
fi
elif [ "$i" -eq "7" ]; then
if [ "$(command -v bat)" ]; then
sync_bat
else
echo "bat is not installed. Skipping."
fi
elif [ "$i" -eq "8" ]; then
if [ "$(command -v lazygit)" ]; then
sync_lazygit
else
echo "lazygit is not installed. Skipping."
fi
elif [ "$i" -eq "9" ]; then
if [ "$(command -v lsd)" ]; then
sync_lsd
else
echo "lsd is not installed. Skipping."
fi
elif [ "$i" -eq "10" ]; then
if [ "$(command -v poetry)" ]; then
sync_poetry
else
echo "poetry is not installed. Skipping."
fi
elif [ "$i" -eq "11" ]; then
if [ "$(command -v ngrok)" ]; then
sync_ngrok
else
echo "ngrok is not installed. Skipping."
fi
elif [ "$i" -eq "12" ]; then
if [ "$(command -v starship)" ]; then
sync_starship
else
echo "starship is not installed. Skipping."
fi
elif [ "$i" -eq "13" ]; then
if [ "$(command -v topgrade)" ]; then
sync_topgrade
else
echo "topgrade is not installed. Skipping."
fi
elif [ "$i" -eq "14" ]; then
if [ "$(command -v amfora)" ]; then
sync_amfora
else
echo "amfora is not installed. Skipping."
fi
elif [ "$i" -eq "15" ]; then
if [ "$(command -v zellij)" ]; then
sync_zellij
else
echo "zellij is not installed. Skipping."
fi
elif [ "$i" -eq "16" ]; then
if [ "$(command -v ghostty)" ]; then
sync_ghostty
else
echo "ghostty is not installed. Skipping."
fi
elif [ "$i" -eq "17" ]; then
if [ "$(command -v spf)" ]; then
sync_superfile
else
echo "superfile is not installed. Skipping."
fi
elif [ "$i" -eq "18" ]; then
sync_templates_dir
elif [ "$i" -eq "19" ]; then
if [ "$(command -v gnome-extensions-cli)" ]; then
sync_gnome_extensions
else
echo "gnome-extensions-cli or dconf is not installed. Skipping."
fi
elif [ $i -eq "20" ]; then
if [ "$(command -v rio)" ]; then
sync_rioterm
else
echo "rio term is not installed. Skipping."
fi
elif [ "$i" -eq "21" ]; then
sync_all
break 2
elif [ "$i" = "q" ]; then
echo "Exiting..."
break 2
else
echo "Invalid Option!"
fi
done
done
printf "Dotfiles Installation/Syncing Done.\n"
printf "It's recommended to restart your device. If you encountered any bugs/mistakes:\n"
printf "Please raise an issue at https://github.com/Kunal2007-web/KDotfiles/issues"