-
Notifications
You must be signed in to change notification settings - Fork 0
/
link.sh
42 lines (34 loc) · 886 Bytes
/
link.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
42
#!/usr/bin/env bash
function __zsh__() {
ln -sfv "$(pwd)/.zshrc" "$HOME/.zshrc"
}
function __functions__() {
ln -sfv "$(pwd)/.functions" "$HOME/.functions"
}
function __aliases__() {
ln -sfv "$(pwd)/.aliases" "$HOME/.aliases"
}
function __tmux__() {
ln -sfv "$(pwd)/.tmux.conf" "$HOME/.tmux.conf"
}
function __git__() {
ln -sfv "$(pwd)/git/.gitconfig" "$HOME/.gitconfig"
ln -sfv "$(pwd)/git/.gitignore_global" "$HOME/.gitignore_global"
}
function __vim__() {
ln -sfv "$(pwd)/.vimrc" "$HOME/.vimrc"
}
function __windows__() {
cd windows_os && source link.sh
}
if [ "$1" != "" ] && type "__$1__" &> /dev/null; then
eval "__$1__"
elif [ "$1" == "--main" ]; then
__zsh__
__functions__
__aliases__
__git__
__vim__
else
echo "Usage: ./link.sh (zsh/ functions/ aliases/ tmux/ git/ vim/ windows (for Windows OS) | --main)"
fi