-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.sh
More file actions
executable file
·44 lines (37 loc) · 863 Bytes
/
shell.sh
File metadata and controls
executable file
·44 lines (37 loc) · 863 Bytes
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
#!/bin/bash
zsh () {
echo "Linking config for zsh and aliases ..."
if [ -f "$HOME/.zshrc" ]; then
echo "WARNING: $HOME/.zshrc already exists. Do you want to replace it with the one from dotfiles? (y/n)"
read -r response
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]
then
rm $HOME/.zshrc
stow --target=$HOME zsh
else
echo "Aborting..."
exit 1
fi
fi
}
starship () {
echo "Linking config for starship ..."
stow --target=$HOME starship
}
tmux () {
echo "Linking config for tmux ..."
stow --target=$HOME tmux
}
git () {
echo "Linking config for git ..."
stow --target=$HOME git
}
# check that stow is installed
if ! [ -x "$(command -v stow)" ]; then
echo 'Error: stow is not installed.' >&2
exit 1
fi
zsh
starship
tmux
git