3 # Script for installing tmux on systems where you don't have root access.
4 # tmux will be installed in $HOME/local/bin.
5 # It's assumed that wget and a C/C++ compiler are installed.
7 # File ID: 65a017ec-321f-11e4-aebb-0026b9848456
12 # create our directories
13 mkdir
-p $HOME/local $HOME/tmux_tmp
16 # download source files for tmux, libevent, and ncurses
17 curl
-L https
://github.com
/downloads
/libevent
/libevent
/libevent-2.0
.19-stable.
tar.gz
>libevent-2.0
.19-stable.
tar.gz
18 wget
ftp://ftp.gnu.org
/gnu
/ncurses
/ncurses-5.9.
tar.gz
20 # extract files, configure, and compile
25 tar xvzf libevent-2.0
.19-stable.
tar.gz
26 cd libevent-2.0
.19-stable
27 .
/configure
--prefix=$HOME/local --disable-shared
35 tar xvzf ncurses-5.9.
tar.gz
37 .
/configure
--prefix=$HOME/local
45 git clone git
://git.code.sf.net
/p
/tmux
/tmux-code tmux
48 .
/configure CFLAGS
="-I$HOME/local/include -I$HOME/local/include/ncurses" LDFLAGS
="-L$HOME/local/lib -L$HOME/local/include/ncurses -L$HOME/local/include"
49 CPPFLAGS
="-I$HOME/local/include -I$HOME/local/include/ncurses" LDFLAGS
="-static -L$HOME/local/include -L$HOME/local/include/ncurses -L$HOME/local/lib" make
50 cp tmux
$HOME/local
/bin
56 echo "$HOME/local/bin/tmux is now available. You can optionally add $HOME/local/bin to your PATH."