forked from Jidbo/.dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·48 lines (36 loc) · 1.23 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·48 lines (36 loc) · 1.23 KB
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
#!/bin/sh
# Path to your dotfiles.
export DOTFILES=$HOME/.dotfiles
echo "Setting up your system..."
echo "Your dotfiles path: $DOTFILES"
if [ ! -d $HOME/.znap/znap ]; then
echo "Installing znap..."
sh -c "$(git clone --depth 1 -- https://github.com/marlonrichert/zsh-snap.git $HOME/.znap/znap)"
fi
# Removes .zshrc from $HOME (if it exists) and symlinks the .zshrc file from the .dotfiles
rm -rf $HOME/.zshrc
ln -s $DOTFILES/zsh/.zshrc $HOME/.zshrc
# Install package manager release age policies
source "$DOTFILES/install-policies.sh"
# Relink other software configs
# git
# We only include our config here to allow other tools to still modify the gitconfig locally with user specific paths etc.
# E.g. znap adds maintenance entries there.
if ! grep -q "path = $DOTFILES/.gitconfig" ~/.gitconfig; then
echo "Adding gitconfig include statement to ~/.gitconfig"
echo """
[include]
path = $DOTFILES/.gitconfig
""" >> $HOME/.gitconfig
fi
# nvim
rm -rf $HOME/.config/nvim
mkdir -p $HOME/.config
ln -s $DOTFILES/nvim $HOME/.config/nvim
# ghostty
rm -rf $HOME/.config/ghostty
mkdir -p $HOME/.config
ln -s $DOTFILES/ghostty $HOME/.config/ghostty
# Install NVIM plugins:
nvim --headless "+Lazy! restore" +qa
echo "Done! All set up, ready to be used!"