-
-
Save nanmu42/97e7d476bbd89301fc74ed23eb0cd65a to your computer and use it in GitHub Desktop.
#!/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 |
sudo apt install -y byacc
for the lazy
Hello,
Not that I expect a reply, though it would help! As the above script isn't commented...why line 27??
Kevin
@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.
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.
I had to install
byacc
as well for the make to run successfully.