-
Notifications
You must be signed in to change notification settings - Fork 0
/
letsgo.sh
executable file
·85 lines (72 loc) · 2.41 KB
/
letsgo.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
#!/bin/bash
install_apt_get() {
local app_name="$1"
# Check if the app exists
if [ -x "$(command -v $app_name)" ]; then
echo \> Found $($app_name --version)
else
echo \> "'$app_name' not found. Installing..."
# Install the app
sudo apt-get update
sudo apt-get install -y "$app_name"
$app_name --version
# Check installation success or failure
if [ $? -eq 0 ]; then
echo \> $($app_name --version) is installed successfully
else
echo \> Error: $app_name installation is failed!
fi
fi
}
install_apt() {
local app_name="$1"
# Check if the app exists
if [ -x "$(command -v $app_name)" ]; then
echo \> Found $($app_name --version)
else
echo \> "'$app_name' not found. Installing..."
# Install the app
sudo apt update
sudo apt install -y "$app_name"
$app_name --version
# Check installation success or failure
if [ $? -eq 0 ]; then
echo \> $($app_name --version) is installed successfully
else
echo \> Error: $app_name installation is failed!
fi
fi
}
install_apt_get "software-properties-common"
install_apt_get "curl"
install_apt_get "git"
install_apt_get "cargo"
install_apt_get "stow"
# APT install
install_apt "tmux"
install_apt "zsh"
# # ZSH
# sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# # ZSH PlUGIN
# 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
# Install Neovim
if [ -x "$(command -v nvim)" ]; then
echo \> Found $(nvim --version)
else
echo "'nvim' not found. Installing..."
# Install the app
add-apt-repository ppa:neovim-ppa/unstable \
&& sudo apt-get update \
&& sudo apt-get install -y neovim
nvim --version
# Check installation success or failure
if [ $? -eq 0 ]; then
echo \> $(nvim --version) is installed successfully
else
echo \> Error: nvim installation is failed!
fi
fi
# install vim-plug
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'