forked from sunny/old-dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·62 lines (53 loc) · 1.22 KB
/
install.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/zsh
set -e
link() {
from="$PWD/links/$1"
to="$2"
[[ ! $to ]] && to="$HOME/$1"
if [[ ! -f $to ]]; then
echo "-----> Linking $to"
mkdir -p "`dirname $to`"
ln -s $from $to
fi
}
copy() {
from="$PWD/copies/$1"
to="$2"
[[ ! $to ]] && to="$HOME/$1"
if [[ ! -f $to ]]; then
echo "-----> Creating $to"
mkdir -p "`dirname $to`"
cp $from $to
fi
}
install_zsh_plugin() {
CURRENT_DIR=`pwd`
ZSH_PLUGINS_DIR="$HOME/.oh-my-zsh/custom/plugins"
mkdir -p "$ZSH_PLUGINS_DIR" && cd "$ZSH_PLUGINS_DIR"
if [ ! -d "$ZSH_PLUGINS_DIR/zsh-syntax-highlighting" ]; then
echo "-----> Installing zsh plugin 'zsh-syntax-highlighting'..."
git clone git://github.com/zsh-users/zsh-syntax-highlighting.git
fi
cd "$CURRENT_DIR"
}
# Plugins
install_zsh_plugin
# Links
link .aliases
link .gemrc
link .gitconfig
link .gitignore
link .irbrc
link .psqlrc
link .rspec
link .tmux.conf
link .zshrc
link .hushlogin
link bin/git-fetch-and-delete
link bin/gh-rename-master
link .psql/.keep
link vscode-settings.json "$HOME/Library/Application Support/Code/User/settings.json"
link keybindings.json "$HOME/Library/Application Support/Code/User/keybindings.json"
# Copies
copy .config/git/template/HEAD
copy .zshlocal