Skip to content

Instantly share code, notes, and snippets.

@LplusKira
Last active October 27, 2020 00:44
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 LplusKira/6c1b64132ff058f9d2ae359d6f4bc79b to your computer and use it in GitHub Desktop.
Save LplusKira/6c1b64132ff058f9d2ae359d6f4bc79b to your computer and use it in GitHub Desktop.
tmux 3.0a installation script on ubuntu:16.04
#!/bin/bash
set -e
VERSION="3.0a"
wait_time=10
my_cfg="https://gist.githubusercontent.com/LplusKira/e6c44f54b79b04b5dba9198fec5a9acd/raw/f1fab270c7abcb91f19e07d3775639f5763f23d1/.tmux.conf"
echo "Enter your password: "
read -s password
echo "This will remove current tmux and replace it with ver: ${VERSION}"
echo "You have $wait_time secs to regret this decision ; )"
sleep $wait_time
# Credit the script bellow to http://witkowskibartosz.com/blog/update-your-tmux-to-latest-version.html#.Xt7GDjdKjCI
{
# Purge old ver
echo $password | sudo -S apt-get -y remove tmux
} && {
# Dependencies
echo $password | sudo -S apt-get -y install wget tar libevent-dev libncurses-dev xclip
} && {
# Download new specific version
wget https://github.com/tmux/tmux/releases/download/${VERSION}/tmux-${VERSION}.tar.gz
} && {
# Check new-ver's package
tar xf tmux-${VERSION}.tar.gz
rm -f tmux-${VERSION}.tar.gz
} && {
# Build it locally
cd tmux-${VERSION}
./configure
make
echo $password | sudo make install
cd -
} && {
# Clean-up built dependencies
echo $password | sudo rm -rf /usr/local/src/tmux-*
echo $password | sudo mv tmux-${VERSION} /usr/local/src
}
# Install Tmux Plugin manager
## Overwrite manager
rm -rf ~/.tmux/plugins/tpm
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# Get my tmux config
wget $my_cfg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment