Last active
January 18, 2017 07:22
-
-
Save rbf/5d4eface55197f21607f34b61f172a05 to your computer and use it in GitHub Desktop.
Upgrade tmux on an ubuntu machine like in c9.io.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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