-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdeploy.sh
executable file
·66 lines (58 loc) · 1.49 KB
/
deploy.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
63
64
65
66
#! /bin/bash
SOURCE=$(dirname $(readlink -f $0))
# Prepare git hooks
for hook in $(ls $SOURCE/git_hooks/); do
if [ ! -f ".git_template/hooks/$hook" ]; then
ln -fs "$SOURCE/git_hooks/$hook" ".git_template/hooks/$hook"
fi
done
# Desktop launchers
mkdir -p ~/.local/share/applications
for launcher in $(ls $SOURCE/.local/share/applications/*.desktop); do
ln -rfs "$launcher" ~/.local/share/applications/"`basename $launcher`"
done
# fonts
mkdir -p ~/.local/share/fonts/
for font in $(ls $SOURCE/.local/share/fonts/*.otf); do
ln -rfs "$font" ~/.local/share/fonts/"`basename $font`"
done
files[0]='.gconf/apps/gnome-terminal'
files[1]='.ackrc'
files[2]='.bashrc'
files[3]='.config/i3'
files[4]='.config/polybar'
files[5]='.config/alacritty'
files[6]='.scripts'
files[7]='.vimrc'
files[8]='.bash_profile'
files[9]='.bash_aliases'
files[10]='.gitconfig'
files[11]='.gitattributes'
files[12]='.gitignore-global'
files[13]='.vim'
files[14]='.tmux.conf'
files[15]='.git_template'
files[16]='.self'
files[17]='.editorconfig'
files[18]='.Xresources'
files[19]='.inputrc'
files[20]='.profile'
files[21]='xterm-256color-italic.terminfo'
files[22]='.emacs'
files[23]='.config/nvim'
files[24]='.config/rofi'
files[25]='.config/regolith'
files[26]='.tmate.conf'
files[27]='git-completion.bash'
files[28]='git-prompt.sh'
for f in "${files[@]}"
do
[ -a $f ] && rm -rf $HOME/$f
sourcedir=$(dirname $HOME/$f)
if [ ! -d $(dirname $HOME/$f) ]
then
mkdir -p $sourcedir
fi
ln -fs $SOURCE/$f $HOME/$f
done
mkdir -p ~/.vim/backup