-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsync.sh
More file actions
executable file
·47 lines (43 loc) · 1.46 KB
/
sync.sh
File metadata and controls
executable file
·47 lines (43 loc) · 1.46 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
#!/bin/bash
# Get the full path to this script
SCRIPT=$(readlink -f $0)
DIR="${SCRIPT%/*}"
# First check all the dirs are in place
mkdir -p $HOME/.config
mkdir -p $HOME/.zsh
mkdir -p $HOME/.local/bin
mkdir -p $HOME/.local/completions
# Remove any pre-exisitng files
rm -f $HOME/.gitconfig
rm -f $HOME/.tmux.conf
rm -f $HOME/.zshrc
rm -rf $HOME/.zsh
rm -f $HOME/.local/completions/_git-co
rm -f $HOME/.local/completions/_git-ll
rm -f $HOME/.local/bin/t
rm -f $HOME/.local/bin/tt
rm -f $HOME/.local/bin/gbt
rm -f $HOME/.local/bin/git-co
rm -f $HOME/.local/bin/git-ll
rm -f $HOME/.local/bin/git-llp
rm -f $HOME/.local/bin/git-llu
rm -f $HOME/.local/bin/git-bl
rm -f $HOME/.config/starship.toml
rm -rf $HOME/.config/nvim
# Add the files as symlinks to this repo
ln -s $DIR/git/.gitconfig $HOME/.gitconfig
ln -s $DIR/git/git-co $HOME/.local/bin/git-co
ln -s $DIR/git/git-ll $HOME/.local/bin/git-ll
ln -s $DIR/git/git-llp $HOME/.local/bin/git-llp
ln -s $DIR/git/git-llu $HOME/.local/bin/git-llu
ln -s $DIR/git/git-bl $HOME/.local/bin/git-bl
ln -s $DIR/git/completions/_git-co $HOME/.local/completions/_git-co
ln -s $DIR/git/completions/_git-ll $HOME/.local/completions/_git-ll
ln -s $DIR/tmux/.tmux.conf $HOME/.tmux.conf
ln -s $DIR/zsh/.zshrc $HOME/.zshrc
ln -s $DIR/zsh/.zsh $HOME/.zsh
ln -s $DIR/zsh/t $HOME/.local/bin/t
ln -s $DIR/zsh/tt $HOME/.local/bin/tt
ln -s $DIR/zsh/tt $HOME/.local/bin/gbt
ln -s $DIR/starship/starship.toml $HOME/.config/starship.toml
ln -s $DIR/nvim $HOME/.config/nvim