-
Notifications
You must be signed in to change notification settings - Fork 1
/
install_tmux.sh
executable file
·73 lines (59 loc) · 2.5 KB
/
install_tmux.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
#!/bin/bash
# Install tmux
# https://github.com/tmux/tmux/wiki/Installing
cd $HOME
# try to determine which kind of system we are on
YUM_CMD=$(which yum 2> /dev/null)
APT_GET_CMD=$(which apt-get 2> /dev/null)
if [[ ! -z $YUM_CMD ]]; then
#sudo yum install gcc kernel-devel make ncurses-devel git
echo "yum packages required: gcc kernel-devel make ncurses-devel git"
elif [[ ! -z $APT_GET_CMD ]]; then
#sudo apt-get install build-essential libncurses-dev git
echo "apt-get packages required: build-essential libcurses-dev git"
else
echo "NOTE: Neither yum nor apt-get are present on this system; some dependencies may need to be installed manually"
fi
# install deps
mkdir -p $HOME/.local
# libevent
#curl -OL https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
curl -OL https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz
#tar -xvzf libevent-2.0.22-stable.tar.gz
tar -xvzf libevent-2.1.12-stable.tar.gz
#cd libevent-2.0.22-stable
cd libevent-2.1.12-stable
./configure --prefix=$HOME/.local
# make -j worked everywhere but 1 server which yielded forking errors
# presumably due to user process limits, so, we default to slower more dependable builds
#make -j && make install
make && make install
cd ..
# ncurses
NCURSES_VERSION="6.2"
curl -OL https://ftp.gnu.org/pub/gnu/ncurses/ncurses-${NCURSES_VERSION}.tar.gz
tar -xvzf ncurses-${NCURSES_VERSION}.tar.gz
cd ncurses-${NCURSES_VERSION}
./configure --prefix=$HOME/.local
# make -j worked everywhere but 1 server which yielded forking errors
# presumably due to user process limits, so, we default to slower more dependable builds
#make -j && make install
make && make install
cd ..
# tmux
TMUX_VERSION="3.2a"
curl -OL https://github.com/tmux/tmux/releases/download/${TMUX_VERSION}/tmux-${TMUX_VERSION}.tar.gz
tar -xvzf tmux-${TMUX_VERSION}.tar.gz
cd tmux-${TMUX_VERSION}
#LDFLAGS="-L/usr/local/lib -Wl,-rpath=/usr/local/lib" ./configure --prefix=/usr/local
PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig
./configure --prefix=$HOME/.local CPPFLAGS="-I$HOME/.local/include -I$HOME/.local/include/ncurses" LDFLAGS="-L$HOME/.local/lib"
# make -j worked everywhere but 1 server which yielded forking errors
# presumably due to user process limits, so, we default to slower more dependable builds
#make -j && make install
make && make install
cd ..
# pkill tmux
# close your terminal window (flushes cached tmux executable)
# open new shell and check tmux version
tmux -V