-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·40 lines (35 loc) · 914 Bytes
/
Copy pathsetup.sh
File metadata and controls
executable file
·40 lines (35 loc) · 914 Bytes
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
#!/bin/bash
#-----------------------------------------------------------------------
# Setup script for dotfiles
#-----------------------------------------------------------------------
base_dir=$(cd $(dirname $0); pwd)
make_symlink()
{
target=$1
name=$2
if [ -f $target -a ! -L $target ]; then
echo "$file alyready exists, rename it to $target.org"
mv $target{,.org}
fi
ln -sf $base_dir/$target $name
}
files=(
".agignore"
".aspell.conf"
".bash_profile"
".bashrc"
".gemrc"
".gitconfig"
".git-completion.bash"
".git-prompt.sh"
".npmrc"
".tmux.conf"
".screenrc"
)
cd ~
for file in ${files[@]}; do
make_symlink $file $file
done
make_symlink ".gitconfig.linux" ".gitconfig.os"
make_symlink "vscode/settings.json" ".config/Code/User/settings.json"
make_symlink "vscode/keybindings.json" ".config/Code/User/keybindings.json"