Skip to content

Instantly share code, notes, and snippets.

@rbf
Last active January 18, 2017 07:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rbf/5d4eface55197f21607f34b61f172a05 to your computer and use it in GitHub Desktop.
Save rbf/5d4eface55197f21607f34b61f172a05 to your computer and use it in GitHub Desktop.
Upgrade tmux on an ubuntu machine like in c9.io.
# SOURCE: https://github.com/kaosf/ubuntu-setup/blob/9ddaed8033a182db85a0c0fcec3cbe37ba5047b2/tmux-setup.sh (via c9.io support)
# install: curl -LO https://gist.githubusercontent.com/rbf/5d4eface55197f21607f34b61f172a05/raw/tmux-install.sh
# NOTE: When installing a c9.io machine from scratch refer to http://rbf.li/c9config instead.
VERSION=2.3
if [[ $1 = local ]]; then
echo 'Build "libevent-dev" and "libncurses-dev".' >&2
else
sudo apt-get -y update
sudo apt-get -y install libevent-dev libncurses-dev
sudo apt-get -y remove tmux
fi
wget https://github.com/tmux/tmux/releases/download/${VERSION}/tmux-${VERSION}.tar.gz
tar xzf tmux-${VERSION}.tar.gz
rm -f tmux-${VERSION}.tar.gz
cd tmux-${VERSION}
if [[ $1 = local ]]; then
./configure --prefix=$HOME/local
make
make install
mkdir -p $HOME/local/src
cd -
rm -rf $HOME/local/src/tmux-*
mv tmux-${VERSION} $HOME/local/src
else
./configure
make
sudo make install
cd -
sudo rm -rf /usr/local/src/tmux-*
sudo mv tmux-${VERSION} /usr/local/src
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment