-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup
executable file
·65 lines (54 loc) · 1.71 KB
/
setup
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
64
#!/bin/sh
DOTFILES_DIR=~/.config/dotfiles
cd $DOTFILES_DIR
mkdir -p ~/.vim/bundle
mkdir -p ~/.vim/backup
if [ -f ~/.vimrc ]; then
backup_filename=~/.vimrc.bak;
echo ".vimrc found. move it to $backup_filename"
mv ~/.vimrc $backup_filename;
mkdir -p ~/.vim/pack
fi
ln -s $DOTFILES_DIR/vimrc ~/.vimrc
if [ -f ~/.bashrc ]; then
backup_filename=~/.bashrc.bak;
echo ".bashrc found. move it to $backup_filename"
mv ~/.bashrc $backup_filename;
fi
ln -s $DOTFILES_DIR/bashrc ~/.bashrc
if [ -d ~/.bashrc.d ]; then
backup_filename=~/.bashrc.d.bak;
echo ".bashrc.d found. move it to $backup_filename"
mv ~/.bashrc.d $backup_filename;
fi
ln -s $DOTFILES_DIR/bashrc.d ~/.bashrc.d
if [ -f ~/.gitconfig ]; then
backup_filename=~/.gitconfig.bak;
echo ".gitconfig found. move it to $backup_filename"
mv ~/.gitconfig $backup_filename;
fi
ln -s $DOTFILES_DIR/gitconfig ~/.gitconfig
if [ -f ~/.gitignore ]; then
backup_filename=~/.gitignore.bak;
echo ".gitignore found. move it to $backup_filename"
mv ~/.gitignore $backup_filename;
fi
ln -s $DOTFILES_DIR/gitignore ~/.gitignore
if [ -f ~/.tmux.conf ]; then
backup_filename=~/.tmux.conf.bak;
echo ".tmux.conf found. move it to $backup_filename"
mv ~/.tmux.conf $backup_filename;
fi
ln -s $DOTFILES_DIR/tmux.conf ~/.tmux.conf
if [ -d ~/.config/fish ] && ![ -L ~/.config/fish ]; then
backup_filename=~/.config/fish.bak;
echo ".config/fish found. move it to $backup_filename"
mv ~/.config/fish $backup_filename;
fi
ln -s $DOTFILES_DIR/fish ~/.config/fish
if [ -d ~/.config/kitty ]; then
backup_filename=~/.config/kitty.bak;
echo ".config/kitty found. move it to $backup_filename"
mv ~/.config/kitty $backup_filename;
fi
ln -s $DOTFILES_DIR/kitty ~/.config/kitty