Source

castle-zundr-dotfiles / install-tmux

#!/bin/bash -e
apps_dir=$HOME/apps
tmux_dir=$apps_dir/tmux
tmux_version=1.7
tmux_url=http://sourceforge.net/projects/tmux/files/tmux/tmux-${tmux_version}/tmux-${tmux_version}.tar.gz/download
tmux_tar=tmp/tmux-${tmux_version}.tar.gz
tmux_build_dir=tmp/tmux-${tmux_version}
mkdir -p $tmux_build_dir

# get helper function
wget --quiet --timestamping https://raw.github.com/gist/3448412/dotfiles-installer.sh
. dotfiles-installer.sh

ensure_package 'make'
ensure_package 'libncurses5-dev'
ensure_package 'libevent-dev'

wget ${tmux_url} -O - | (cd tmp && tar xz)
cd ${tmux_build_dir} && ./configure --prefix=${tmux_dir} && make -j4 install

# install links in bin dir
link_binaries $tmux_dir