-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup
More file actions
executable file
·110 lines (106 loc) · 3.05 KB
/
Copy pathsetup
File metadata and controls
executable file
·110 lines (106 loc) · 3.05 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#!/bin/bash
#dotfiles/setup - checks for existence of dotfiles from repo in users home directory,
# creates symlinks to repo files, backs up existing files as ~/.name.bak
#set dotfiles folder
dotfiles="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )"
#.bashrc {{{
read -p 'link ~/.bashrc? [y/N] ' response
if [ $response == "y" ]; then
if [ -f ~/.bashrc ]; then
mv ~/.bashrc ~/.bashrc.bak
echo "backing up current ~/.bashrc as ~/.bashrc.bak"
fi
ln -s $dotfiles/.bashrc ~/.bashrc
fi
#}}}
#.bash_login {{{
read -p 'link ~/.bash_login? [y/N] ' response
if [ $response == "y" ]; then
if [ -f ~/.bash_login ]; then
mv ~/.bash_login ~/.bash_login.bak
echo "backing up current ~/.bash_login ~/.bash_login.bak"
fi
ln -s $dotfiles/.bash_login ~/.bash_login
fi
#}}}
#.bash_aliases {{{
read -p 'link ~/.bash_aliases? [y/N] ' response
if [ $response == "y" ]; then
if [ -f ~/.bash_aliases ]; then
mv ~/.bash_aliases ~/.bash_aliases.bak
echo "backing up current ~/.bash_aliases ~/.bash_aliases.bak"
fi
ln -s $dotfiles/.bash_aliases ~/.bash_aliases
fi
#}}}
#.inputrc {{{
read -p 'link ~/.inputrc? [y/N] ' response
if [ $response == "y" ]; then
if [ -f ~/.inputrc ]; then
mv ~/.inputrc ~/.inputrc.bak
echo "backing up current ~/.inputrc as ~/.inputrc.bak"
fi
ln -s $dotfiles/.inputrc ~/.inputrc
fi
#}}}
#.tmux/ {{{
read -p 'link ~/.tmux/? [y/N] ' response
if [ $response == "y" ]; then
if [ -d ~/.tmux.conf ]; then
mv ~/.tmux/ ~/.tmux.bak/
echo "backing up current ~/.tmux/ as ~/.tmux.bak/"
fi
ln -s $dotfiles/.tmux ~/.tmux
fi
#}}}
#.vimrc {{{
read -p 'link ~/.vimrc? [y/N] ' response
if [ $response == "y" ]; then
if [ -f ~/.vimrc ]; then
mv ~/.vimrc ~/.vimrc.bak
echo "backing up current ~/.vimrc as ~/.vimrc.bak"
fi
ln -s $dotfiles/.vimrc ~/.vimrc
fi
#}}}
#.vim/ {{{
read -p 'link ~/.vim/? [y/N] ' response
if [ $response == "y" ]; then
if [ -d ~/.vim/ ]; then
mv ~/.vim/ ~/.vim/
echo "backing up current ~/.vim/ as ~/.vim.bak/"
fi
ln -s $dotfiles/vim ~/.vim
fi
#}}}
#.xinitrc {{{
read -p 'link ~/.xinitrc? [y/N] ' response
if [ $response == "y" ]; then
if [ -f ~/.xinitrc ]; then
mv ~/.xinitrc ~/.xinitrc.bak
echo "backing up current ~/.xinitrc ~/.xinitrc.bak"
fi
ln -s $dotfiles/.xinitrc ~/.xinitrc
fi
#}}}
#.Xresources {{{
read -p 'link ~/.Xresources? [y/N] ' response
if [ $response == "y" ]; then
if [ -f ~/.Xresources ]; then
mv ~/.Xresources ~/.Xresources.bak
echo "backing up current ~/.Xresources ~/.Xresources.bak"
fi
ln -s $dotfiles/.Xresources ~/.Xresources
fi
#}}}
#.config/i3/ {{{
read -p 'link ~/.config/i3/? [y/N] ' response
if [ $response == "y" ]; then
if [ -d ~/.config/i3/config ]; then
mv ~/.config/i3/ ~/.config/i3.bak/
echo "backing up current ~/.config/i3/ as ~/.config/i3.bak/"
fi
ln -s $dotfiles/i3 ~/.config/i3
fi
#}}}
# vim: set foldmethod=marker: