-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
89 lines (74 loc) · 1.61 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!bin/bash
# FUNCTIONS
###########
symbolic_links() {
for file in $1;
do
ln -s $2/$3/$file
done
}
config_symbolic_links() {
for file in $1;
do
ln -s "$2/.config/$3/$file"
done
}
FILES=".gitconfig \
.i3status.conf \
.vim \
.vimrc \
.oh-my-zsh \
.Xresources \
.zshrc"
DEV_FOLDER=$1
# Config files in home folder
#############################
GIT_FILES=".gitconfig"
I3_FILES=".i3status.conf"
VIM_FILES=".vim \
.vimrc"
XTERM=".Xresources "
ZSH_FILES=".oh-my-zsh \
.zshrc"
# Config files inside ~/.config
###############################
I3_CONFIG_FILES="i3"
# HOME FOLDER
#############
cd ~
# Make a backup of each file
############################
for file in $FILES;
do
mv $file "$file.bck"
done
# Make symbolic links to dev folder
###################################
symbolic_links "$GIT_FILES" "$DEV_FOLDER" "git"
symbolic_links "$I3_FILES" "$DEV_FOLDER" "i3"
symbolic_links "$VIM_FILES" "$DEV_FOLDER" "vim"
symbolic_links "$XTERM_FILES" "$XTERM_FOLDER" "xterm"
symbolic_links "$ZSH_FILES" "$DEV_FOLDER" "zsh"
# ~/.CONFIG FOLDER
##################
cd .config
# Make a backup of each file
############################
for file in $CONFIG_FILES;
do
mv $file "$file.bck"
done
# Make symbolic links to dev folder
###################################
config_symbolic_links $I3_CONFIG_FILES $DEV_FOLDER "i3"
# Binaries to install manually
##############################
TO_INSTALL="FZF \
AG \
zsh-syntax-highlighting \
nnn \
tig"
for bin in $TO_INSTALL
do
echo "Install $bin"
done