-
Notifications
You must be signed in to change notification settings - Fork 2
/
flo-tmux-install.sh
95 lines (86 loc) · 2.13 KB
/
flo-tmux-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
90
91
92
93
94
95
#!/bin/sh
set -e pipefail
Os="$(uname -s)"
if [ ! "$Os" = 'Linux' ]; then
echo 'Windows and Mac OS are not supported !'
exit 1
fi
echo "========================================="
echo "=== Welcome to Flo-tmux installer ! ==="
echo "========================================="
echo "\n"
read -p 'Please set your username: ' username
echo "\n"
echo "It will create two folders: $HOME/$username and $HOME/$username/Apps/Tmux"
echo "\n"
echo "Are you sure to want to set '$username' as folder name ?"
Flo="$HOME/$username"
Apps="$HOME/$username/Apps"
Tmux="$HOME/$username/Apps/Tmux"
if [ -d "$Flo" ] && [ -d "$Apps" ]; then
echo "\n"
echo " ==================================================="
echo ' Directories ~/Flo & ~/Flo/Apps already exists ! '
echo " ==================================================="
exit 1
else
mkdir ~/Flo
echo '=== ~/Flo created ! ==='
echo "\n"
mkdir ~/Flo/Apps
echo '=== ~/Flo/Apps created ! ==='
echo "\n"
echo '=== apt update ==='
echo "\n"
sudo apt update
echo '=== apt upgrade ==='
echo "\n"
sudo apt upgrade -y
# Global dependencies
echo '=== install global dependencies ==='
echo "\n"
sudo apt install -y ripgrep fd-find silversearcher-ag bat \
mlocate zoxide python3-pip libsqlite3-dev libssl-dev
# Tmux
echo "\n"
echo "======================="
echo " INSTALLING TMUX "
echo "======================="
echo "\n"
echo '=== dependencies ==='
echo "\n"
sudo apt install -y libevent-dev ncurses-dev build-essential bison
echo '=== remove existing tmux ==='
echo "\n"
sudo apt remove -y tmux
echo '=== autoremove ==='
echo "\n"
sudo apt autoremove -y
echo '=== remove existing .tmux ==='
echo "\n"
rm -rf .tmux
echo '=== git clone ==='
echo "\n"
git clone https://github.com/tmux/tmux.git ~/Flo/Apps/Tmux
cd ~/Flo/Apps/Tmux
echo '=== autogen ==='
echo "\n"
sh autogen.sh
echo '=== configure ==='
echo "\n"
./configure
echo '=== make ==='
echo "\n"
make
echo '=== make install ==='
echo "\n"
sudo make install
echo "\n"
echo "========================"
echo " TMUX INSTALLED ! "
echo "========================"
echo "\n"
echo '=== tmux version ==='
echo "\n"
tmux -V
fi