-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·34 lines (26 loc) · 928 Bytes
/
install.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
#!/usr/bin/env sh
check_program() {
if ! command -v $1 &> /dev/null; then
echo "Command $1 could not be found"
exit 1
fi
}
# Get platform name in lowercase
platform="$(uname | tr '[:upper:]' '[:lower:]')"
# Check if the platform is one of the supported ones
if [[ "$platform" != "darwin" && "$platform" != "linux" ]]; then
echo "Platform $platform not supported"
exit 1
fi
check_program "git"
check_program "stow"
check_program "make"
git clone --recurse-submodule git@github.com:lorenzorapetti/dotfiles.git $HOME/.dotfiles
# Stow
cd $HOME/.dotfiles
make $platform
# Download fisher and install fisher plugins
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher update
# Install tpm (tmux package manager) and immediately install all plugins
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
~/.tmux/plugins/tpm/scripts/install_plugins.sh