-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·51 lines (42 loc) · 1.05 KB
/
setup.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
#!/bin/bash
## Check for Stow
type stow >/dev/null 2>&1 || { echo "Stow not found"; exit 1; }
## Add list of folders to be managed by Stow
STOWED_DIRS=( alacritty \
bin \
dircolors \
fish \
fonts \
git \
i3 \
kitty \
nvim \
starship \
systemd \
terminfo \
tmux \
vim \
xorg \
zsh \
)
#
# Pre-Stow warm-up
#
## Load submodules
git submodule update --init --recursive || exit 1
# Make sure local shared folder exists
mkdir -p ${HOME}/.local/share
#
# IIIIIT'S STOW TIME!!
#
# using `-R' makes this safe to re-run
for dir in ${STOWED_DIRS[@]}; do
stow -Rv $dir || exit 1
done
#
# Post-Stow after-party
#
if [[ $(ps -p 1 -o comm=) == "systemd" ]]; then
systemctl --user enable --now ssh-agent.service
fi
exit 0