-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·170 lines (127 loc) · 4.72 KB
/
install
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
#!/bin/bash
sudo apt-get update
### remove pkg
sudo apt-get remove --assume-yes 'vim*' >/dev/null 2>&1
sudo apt-get remove docker docker-engine docker.io containerd runc >/dev/null 2>&1
### Add pkg
sudo apt-get install --assume-yes \
gcc \
g++ \
make \
wget \
curl \
git \
vifm \
zsh \
apt-transport-https \
ca-certificates \
gnupg \
gnupg2 \
lsb-release \
fonts-firacode \
mlocate \
net-tools \
openssh-server \
htop \
fd-find \
silversearcher-ag \
ripgrep \
tmux \
vim-athena \
neovim \
terminator
### keys
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor --yes -o /usr/share/keyrings/githubcli-archive-keyring.gpg
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor --yes -o /usr/share/keyrings/docker-archive-keyring.gpg
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
curl -sSL https://rvm.io/mpapis.asc | gpg --import -
curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
gpg2 --recv-keys \
409B6B1796C275462A1703113804BB82D39DC0E3 \
7D2BAF1CF37B13E2069D6956105BD0E739499BDB
### source
[ ! -d /etc/apt/sources.list.d/github-cli.list ] && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
[ ! -d /etc/apt/sources.list.d/docker.list ] && echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
### Add pkg
sudo apt-get install --assume-yes \
gh \
docker-ce \
docker-ce-cli \
containerd.io \
docker-compose-plugin \
nodejs
### web scripts
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
curl -sSL https://get.rvm.io | bash -s stable
if [[ ! -f /usr/local/bin/docker-compose ]]; then
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
fi
if [[ ! -f /etc/bash_completion.d/docker-compose ]]; then
sudo curl \
-L https://raw.githubusercontent.com/docker/compose/1.29.2/contrib/completion/bash/docker-compose \
-o /etc/bash_completion.d/docker-compose
fi
### clone
git clone https://github.com/imaqsood/dotfiles.git $HOME/dotfiles
git clone https://github.com/spaceship-prompt/spaceship-prompt.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/spaceship-prompt --depth=1
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/chrissicool/zsh-256color ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-256color
git clone https://github.com/gpakosz/.tmux.git $HOME/.tmux
git clone https://github.com/VundleVim/Vundle.vim.git $HOME/.vim/bundle/Vundle.vim
git clone https://github.com/junegunn/fzf.git $HOME/.fzf --depth 1
### MKDIR
mkdir -p $HOME/.config/terminator
mkdir -p $HOME/.config/nvim
### soft link
ln -s ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/spaceship-prompt/spaceship.zsh-theme ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/spaceship.zsh-theme -f
ln -s $HOME/dotfiles/zshrc $HOME/.zshrc -f
ln -s $HOME/dotfiles/terminator_config $HOME/.config/terminator/config -f
ln -s $HOME/.tmux/.tmux.conf $HOME/.tmux.conf -f
ln -s $HOME/dotfiles/ssh_config $HOME/.ssh/config -f
ln -s $HOME/dotfiles/vimrc $HOME/.config/nvim/init.vim -f
ln -s $HOME/dotfiles/vimrc $HOME/.vimrc -f
ln -s $HOME/dotfiles/inputrc $HOME/.inputrc -f
ln -s $HOME/dotfiles/editrc $HOME/.editrc -f
### FONTS
### copy
cp .tmux/.tmux.conf.local .
# ssh
ssh-keygen -t rsa -b 4096 -C 'maqsood.ulde@gmail.com' -f $HOME/.ssh/git -N '' <<< n >/dev/null 2>&1
ssh-keygen -t rsa -b 4096 -C 'maqsood.ulde@gmail.com' -f $HOME/.ssh/id_rsa -N '' <<< n >/dev/null 2>&1
### Script
$HOME/.fzf/install --all
echo -ne '\n' | vim +PluginInstall +qall
sudo npm install --global yarn
if ! command -v rvm &> /dev/null; then
rvm install 3.0
rvm use 3.0
fi
# # docker
sudo groupadd docker -f
sudo usermod -aG docker $USER
# newgrp docker
sudo systemctl enable docker.service > /dev/null
sudo systemctl enable containerd.service > /dev/null
# # zsh
# if [[ ! -d $HOME/.oh-my-zsh ]]; then
# cd $SCRIPT_DIR
# fi;
# # terminator
# # if ! command -v terminator &> /dev/null; then
# # fi
# # tmux
# # cd $HOME
# # cd $SCRIPT_DIR
# # vim
# # fzf
# # github cli
# #rvm
# #node
# # yarn
# # if ! command -v yarn &> /dev/null; then
# # fi
# # set inputrc
# # docker-compose