-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsetup.sh
executable file
·41 lines (33 loc) · 1 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
#!/usr/bin/env bash
# This script sets up symlinks to all the dotfiles
# in the user's home directory.
base=${HOME}/dotfiles
# Check for required dependencies before continuing:
if ! command -v git &> /dev/null; then
echo "Error: git is not installed. Please install git first."
exit 1
fi
if ! command -v stow &> /dev/null; then
echo "Error: stow is not installed. Please install stow first."
exit 1
fi
# Set up tmux plugin manager:
mkdir -p ~/.tmux/plugins
if [ ! -d ~/.tmux/plugins/tpm ]; then
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
fi
# Set up all of the configs:
cd ${base}/stow
# This for loop iterates through all directories
# contained in the stow directory. This makes
# it easy to add configurations for new applications
# without having to modify this script.
for app in */; do
stow -t ${HOME} $app
done
# If we have bat, update the theme cache in case new themes
# have been added
if command -v bat &> /dev/null; then
echo "Updating bat cache"
bat cache --build
fi