Last active
September 2, 2016 08:39
-
-
Save ashwinvis/3d5120ace1f080f3d6d61e65486494f5 to your computer and use it in GitHub Desktop.
Tmux local installation without root
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
#!/bin/bash | |
# | |
# Add the following lines to .bashrc before running the script | |
# | |
# export SCRATCH=/scratch/$USER | |
# export XDG_DATA_DIRS=$XDG_DATA_DIRS:$SCRATCH/.local/share | |
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SCRATCH/.local/lib | |
# export PATH=$PATH:$SCRATCH/.local/bin | |
set -e | |
tmuxver=2.2 | |
libeventver=2.0.22 | |
DESTDIR=$SCRATCH/.local | |
mkdir -p /tmp/libevent | |
mkdir -p /tmp/tmux | |
mkdir -p $DESTDIR | |
# Install libevent | |
cd /tmp/libevent | |
wget https://github.com/libevent/libevent/archive/release-$libeventver-stable.zip | |
unzip release-$libeventver-stable | |
cd libevent-release-$libeventver-stable | |
./autogen.sh | |
./configure --prefix=$DESTDIR --sysconfdir=$DESTDIR/etc | |
make | |
make check | |
make install | |
# Install tmux | |
cd /tmp/tmux | |
wget https://github.com/tmux/tmux/releases/download/$tmuxver/tmux-$tmuxver.tar.gz | |
tar xzf tmux-$tmuxver.tar.gz | |
cd tmux-$tmuxver | |
LDFLAGS="-L$DESTDIR/lib" CFLAGS="-I$DESTDIR/include" ./configure --prefix=$DESTDIR | |
make | |
make install | |
rm -r /tmp/libevent /tmp/tmux |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment