-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharch-post-install.sh
More file actions
executable file
·248 lines (245 loc) · 8.52 KB
/
arch-post-install.sh
File metadata and controls
executable file
·248 lines (245 loc) · 8.52 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
#! /bin/bash
function successOrFail {
if [ $? -eq 0 ]; then
echo $1 'done successfuly!'
else
echo $1 'has failed :('
fi
sleep 5
}
function title {
echo "#####################################################################"
echo "#"
echo "#"
echo "#"
echo "#"
echo "####### $1 "
echo "#"
echo "#"
echo "#"
echo "#"
echo "#"
echo "######################################################################"
sleep 5
}
function isInstalled {
package=$1
if pacman -Qi $package > /dev/null ; then
echo "The package $package is installed"
echo "skip installation of $package"
else
echo "The package $package is not installed"
yaourt -S $package
successOrFail $package
fi
}
PS3='Please enter your choice: '
options=("Config yaourt" "Install and configure git" "Install i3 package group" "Install node environment" "Zsh/tmux/tmuxifier" "Install vim" "Install atom" "Themes" "Install other" "Quit")
select opt in "${options[@]}"
do
case $opt in
"Config yaourt")
title 'creating .yaourtrc'
touch .yaourtrc
successOrFail 'create yaourtrc'
echo CONFIRM=1 >> .yaourtrc
echo BUILD_NOCONFIRM=1 >> .yaourtrc
echo EDITFILES=0 >> .yaourtrc
successOrFail 'edit yaourt'
title 'updating system'
yaourt -Syu
title 'installing stow'
isInstalled stow
clear
;;
"Install and configure git")
echo "you chose Install and configure git"
####################################################################
# GIT
####################################################################
title 'GIT'
isInstalled git
title 'git-extras'
isInstalled git-extras
title 'openssh'
isInstalled openssh
title 'creating ssh key for github'
ssh-keygen -t rsa -b 4096 -C "miguelo_0000@hotmail.com"
cd ~/.ssh
chmod +x rsa_id.pub
cat id_rsa.pub
read -n1 -r -p "Press any key to continue..."
cd ~/
title 'Dotfiles'
git clone git@github.com:ShinichiroMike/dotfiles.git
mv dotfiles .dotfiles
successOrFail 'dotfiles installation'
title 'config git'
cd ~/.dotfiles
stow git
successOrFail '.gitconfig installation'
cd ~/
clear
;;
"Install i3 package group")
echo "you chose Install i3 package group"
####################################################################
#i3 STUFF
####################################################################
title 'i3'
isInstalled i3-wm
title 'i3status'
isInstalled i3status
title 'dmenu'
isInstalled dmenu
title 'i3lock-blur'
isInstalled i3lock-blur
title 'creating xinit with i3'
cd ~/.dotfiles
stow xinit
cd ~/
mkdir .config/i3
cp .dotfiles/i3/config .config/i3/config
successOrFail 'copy i3 config '
clear
;;
"Install node environment")
echo "you chose node environment"
####################################################################
# NODE
####################################################################
title 'nvm'
yaourt -S nvm
title 'node stable'
source .zshrc
/bin/zsh -i -c 'nvm install stable'
successOrFail 'node stable install '
# Npm global packages
title "npm install"
/bin/zsh -i -c 'nvm use stable'
/bin/zsh -i -c 'npm install -g yo'
/bin/zsh -i -c 'npm install -g generator-react-webpack-redux'
/bin/zsh -i -c 'npm install -g webpack'
/bin/zsh -i -c 'npm install -g gulp'
clear
;;
"Zsh/tmux/tmuxifier")
echo "you chose Zsh/tmux/tmuxifier"
####################################################################
#SHELL STUFF
####################################################################
title 'zsh'
isInstalled zsh
title 'oh-my-zsh'
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" #oh-my-zsh
cd .oh-my-zsh/plugins
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
cd ~/
source .zshrc
title 'tmux'
isInstalled tmux
title 'tmuxifier'
git clone https://github.com/jimeh/tmuxifier.git ~/.tmuxifier
title 'configuring zsh and tmux'
rm .zshrc
cd ~/.dotfiles
stow zsh
successOrFail '.zshrc install '
stow tmux
successOrFail '.tmux.conf install '
cd ~/
rm -rf .tmuxifier/layouts
mkdir .tmuxifier/layouts
cp -r .dotfiles/layouts .tmuxifier/layouts
successOrFail 'copy tmuxifier layouts'
clear
;;
"Install vim")
echo "you chose Install vim"
####################################################################
#VIM
####################################################################
title 'vim'
isInstalled vim
cd ~/.dotfiles
stow vim
successOrFail '.vimrc intall '
cd ~/
rm -rf .vim
cp -r .dotfiles/.vim ~/
successOrFail 'copy .vim files '
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
successOrFail 'install vim plug '
vim :PlugInstall
clear
;;
"Install atom")
echo "you chose Install atom"
####################################################################
# ATOM
####################################################################
title 'atom'
isInstalled atom-editor-git
#atom packages
echo "************installing atom packages************"
apm install atom-beautify
apm install atom-ternjs
apm install auto-detect-indentation
apm install autocomplete-modules
apm install git-projects
apm install language-babel
apm install linter-eslint
apm install react
apm install pigments
apm install tool-bar
apm install flex-tool-bar
apm install git-plus
apm install emmet
apm install minimap
apm install minimap-bookmarks
apm install sort-lines
apm install stylus
clear
;;
"Themes")
echo "you chose Themes"
####################################################################
#OTHER SOFTWARE
####################################################################
title 'nitrogen'
isInstalled nitrogen
title 'gtk-arc-theme'
isInstalled gtk-theme-arc
isInstalled compton
clear
;;
"Install other")
echo "you chose Install other"
####################################################################
#OTHER SOFTWARE
####################################################################
title gpick
isInstalled gpick
title spotify
isInstalled spotify
title 'ranger'
isInstalled ranger
title 'dropbox'
isInstalled dropbox
title 'chrome'
isInstalled google-chrome
title 'octopi'
isInstalled octopi
clear
;;
"Quit")
break
;;
*) echo invalid option;;
esac
done
################################################################################
#TODOS
################################################################################
#ranger config