-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·63 lines (55 loc) · 1.73 KB
/
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
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
#!/bin/bash
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.macos` has finished
while true; do
sudo -n true
sleep 60
kill -0 "$$" || exit
done 2>/dev/null &
# Check if git and stow is installed
if [ -x "$(command -v git)" ] && [ -x "$(command -v stow)" ]; then
echo "Git and stow are already installed."
else
# Try installing absolutely necessary packages
if [ -x "$(command -v apt-get)" ]; then
sudo apt-get install -y git stow
elif [ -x "$(command -v pacman)" ]; then
sudo pacman -S --noconfirm git stow
elif [ -x "$(command -v brew)" ]; then
brew install git stow
elif [ -x "$(command -v pkg)" ]; then
sudo pkg install git
else
echo "No package manager found. Please install git and stow."
exit 1
fi
fi
DOTFILES_HOME=$HOME/.dotfiles
REPOSITORY=https://gitlab.com/TamasBarta/dotfiles.git
git clone --recurse-submodules -j8 $REPOSITORY "$DOTFILES_HOME"
case $(uname) in
Darwin) source "$DOTFILES_HOME"/install/macos.sh ;;
Linux) source "$DOTFILES_HOME"/install/linux.sh ;;
esac
stow -d "$DOTFILES_HOME" zsh
stow -d "$DOTFILES_HOME" bat
stow -d "$DOTFILES_HOME" tmux
stow -d "$DOTFILES_HOME" nvim
stow -d "$DOTFILES_HOME" lazygit
stow -d "$DOTFILES_HOME" git
stow -d "$DOTFILES_HOME" wezterm
stow -d "$DOTFILES_HOME" asdf
stow -d "$DOTFILES_HOME" topgrade
stow -d "$DOTFILES_HOME" yazi
stow -d "$DOTFILES_HOME" zathura
stow -d "$DOTFILES_HOME" tridactyl
stow -d "$DOTFILES_HOME" jetbrains
stow -d "$DOTFILES_HOME" spotify
stow -d "$DOTFILES_HOME" fastfetch
stow -d "$DOTFILES_HOME" newsboat
stow -d "$DOTFILES_HOME" neomutt
stow -d "$DOTFILES_HOME" yazi
stow -d "$DOTFILES_HOME" mpv
cd "$DOTFILES_HOME" || exit
git remote set-url origin [email protected]:TamasBarta/dotfiles.git