-
Notifications
You must be signed in to change notification settings - Fork 0
/
makesymlinks.sh
executable file
·41 lines (33 loc) · 1.01 KB
/
makesymlinks.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
#!/bin/sh
if [[ $* = "help" ]]; then
echo "To use this script:
./makesymlinks [zsh|bash|tmux|git|other]"
elif [[ $* =~ "zsh" ]]; then
echo Symlinking zsh...
for FILE in .zshrc .zsh_aliases .git-completion.zsh;
do
ln -sfv ~/dotfiles/$FILE ~/$FILE;
done
ln -sv ~/dotfiles/.zsh_local ~/.zsh_local;
git update-index --skip-worktree .zsh_local;
elif [[ $* =~ "bash" ]]; then
echo Symlinking bash...
for FILE in .bashrc .bash_aliases .git-completion.bash;
do
ln -sfv ~/dotfiles/$FILE ~/$FILE ;
done
ln -sv ~/dotfiles/.bash_local ~/.bash_local;
git update-index --skip-worktree .bash_local;
elif [[ $* =~ "tmux" ]]; then
echo Symlinking tmux config...
ln -sfv ~/dotfiles/.tmux.conf ~/.tmux.conf ;
elif [[ $1 =~ "other" ]]; then
echo Symlinking other files...
for FILE in .vimrc .vim;
do
ln -sfv ~/dotfiles/$FILE ~/$FILE;
done
else
echo "To use this script:
./makesymlinks [zsh|bash|other]"
fi