Last active
November 27, 2024 02:03
-
-
Save nanmu42/97e7d476bbd89301fc74ed23eb0cd65a to your computer and use it in GitHub Desktop.
Update tmux to latest version
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
#!/usr/bin/env bash | |
set -e | |
# dependecies | |
apt update | |
apt install -y git automake build-essential pkg-config libevent-dev libncurses5-dev byacc | |
# where our temp file locates | |
rm -rf /tmp/tmux | |
git clone https://github.com/tmux/tmux.git /tmp/tmux | |
cd /tmp/tmux | |
bash autogen.sh | |
./configure && make | |
make install | |
cd - | |
# clean up | |
rm -rf /tmp/tmux |
Thank you!
Thanks for your kindly suggestions guys!
I have updated the script.
This is great! Thank you.
One thing to mention here to anyone running this. Make sure at the very end to reload your shell before running tmux -V
Edit
I used it to make a install script that should work with Debian and CentOS based systems. This doesn't depend on git
and builds a specified version from source.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@kevomac12 I'd assume because it builds and installs the binary, after which you don't need the source code or the build artifacts anymore. Stuff that's in
/tmp/*
implies it's allowed to be deleted/not for longterm storage.