-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.sh
executable file
·94 lines (61 loc) · 1.6 KB
/
script.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
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
#!/bin/bash
files=(
~/.zshrc
# Regolith config
/etc/regolith/i3/config
~/.config/regolith/Xresources
# Ranger
~/.config/ranger/rc.conf
~/.config/ranger/scope.sh
# Vim
~/.vimrc
# Compton
~/.config/compton.conf
# VSCodium (outdated)
# ~/.config/VSCodium/User/keybindings.json
# ~/.config/VSCodium/User/settings.json
# ~/.config/VSCodium/User/snippets/react-snippets.code-snippets
# VSCode (like a normie)
~/.config/Code/User/keybindings.json
~/.config/Code/User/settings.json
~/.config/Code/User/snippets/react-snippets.code-snippets
# Autokey Keybindings
~/hotkeys/Tlgrm.py
)
read -p "Want to git pull first? [Y/n] " DO_A_GIT_PULL
if [[ $DO_A_GIT_PULL = "n" || $DO_A_GIT_PULL = "N" ]]; then
echo "Okay, not pulling!"
echo " "
else
echo "Pulling..."
command git pull --quiet
echo " "
echo "Exiting script in case the remote contains newer refs."
echo "Please run it again, capo."
exit 0
fi
# Here is where the magic happens
for n in ${files[@]}
do
echo "Copying $n..."
cp $n ./dotfiles
done
echo "Also copying wallpapers..."
cp -r ~/Pictures/wallpapers ./dotfiles
echo " "
echo "Succesfully copied all your dotfiles, capo!"
echo " "
read -p "Want to git push? [Y/n] " DO_A_GIT_PUSH
if [[ $DO_A_GIT_PUSH = "n" || $DO_A_GIT_PUSH = "N" ]]; then
echo "Okay, not pushing!"
echo " "
echo "Terrible script capo, salu3."
exit 0
else
read -p "Please write the commit's message: " COMMIT_MESSAGE
command git add ./dotfiles
command git commit -m "$COMMIT_MESSAGE"
command git push
echo " "
echo "Terrible script capo, salu3."
fi