-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbootstrap
More file actions
executable file
·35 lines (27 loc) · 890 Bytes
/
bootstrap
File metadata and controls
executable file
·35 lines (27 loc) · 890 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
#!/usr/bin/env bash
DOTFILES_ROOT=$(pwd)
DOTFILES_OLD=~/dotfiles-old-$(date +%Y-%m-%d.%H:%M:%S)
function dot() {
local src=$1 # the file inside the dotfiles repo
local target=$2 # the file usually located in the home directory
mkdir -p $(dirname "$DOTFILES_OLD/$src")
mv "$target" "$DOTFILES_OLD/$src"
mkdir -p $(dirname "$target")
ln -s "$DOTFILES_ROOT/$src" "$target"
}
function main() {
mkdir "$DOTFILES_OLD"
dot zsh/zshrc ~/.zshrc
dot zsh/MyAntigen.hs ~/.zsh/MyAntigen.hs
dot xresources/Xresources ~/.Xresources
dot xresources/xinitrc ~/.xinitrc
dot vim/vimrc ~/.vimrc
dot tmux/tmux.conf ~/.tmux.conf
dot git/gitignore_global ~/.gitignore_global
dot git/gitconfig ~/.gitconfig
dot npm/npmrc ~/.npmrc
dot i3/config ~/.i3/config
dot i3/i3status.conf ~/.i3status.conf
dot awesome ~/.config/awesome
}
main