Last active
October 27, 2020 00:44
-
-
Save LplusKira/6c1b64132ff058f9d2ae359d6f4bc79b to your computer and use it in GitHub Desktop.
tmux 3.0a installation script on ubuntu:16.04
This file contains hidden or 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
#!/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