[feature] tmux done
This commit is contained in:
parent
72da497067
commit
116b4fcaaf
4
env.sh
4
env.sh
|
@ -26,8 +26,8 @@ in-china () {
|
|||
return 0
|
||||
}
|
||||
|
||||
ln-dir () {
|
||||
[ "$#" -ne 2 ] && echo "ln-dir <dir> <symlink>"
|
||||
lnsf () {
|
||||
[ "$#" -ne 2 ] && echo "lnsf <src> <symlink>"
|
||||
[ ! -L "$2" ] && rm -rf $2
|
||||
SYM_DIR=$(dirname $2)
|
||||
[ -n "$SYM_DIR" ] && mkdir -p $SYM_DIR
|
||||
|
|
|
@ -23,4 +23,4 @@ if [ "$DEFAULT_SHELL" != "$FISH_SHELL" ]; then
|
|||
fi
|
||||
|
||||
# symlink config
|
||||
ln-dir $DIR/config ~/.config/fish
|
||||
lnsf $DIR/config ~/.config/fish
|
||||
|
|
|
@ -19,4 +19,4 @@ case "$PM" in
|
|||
esac
|
||||
|
||||
# symlink configuration
|
||||
ln-dir $DIR/config ~/.config/nvim
|
||||
lnsf $DIR/config ~/.config/nvim
|
||||
|
|
33
tmux/install.sh
Normal file → Executable file
33
tmux/install.sh
Normal file → Executable file
|
@ -1 +1,34 @@
|
|||
#!/bin/bash
|
||||
|
||||
DIR=$(readlink -f $(dirname $0))
|
||||
. $DIR/../env.sh
|
||||
|
||||
TMUX_VER=3.1b
|
||||
|
||||
# install ranger
|
||||
case "$PM" in
|
||||
apt)
|
||||
sudo apt install libevent-dev libncurses5-dev bison autoconf -y
|
||||
TMUX_SRC_URL=https://github.com/tmux/tmux/releases/download/$TMUX_VER/tmux-$TMUX_VER.tar.gz
|
||||
if in-china; then
|
||||
TMUX_SRC_URL=https://gitee.com/klesh/tmux/repository/archive/$TMUX_VER?format=tar.gz
|
||||
fi
|
||||
[ ! -f /tmp/tmux.tar.gz ] && curl -L $TMUX_SRC_URL -o /tmp/tmux.tar.gz
|
||||
rm -rf /tmp/tmux
|
||||
mkdir -p /tmp/tmux
|
||||
tar zxvf /tmp/tmux.tar.gz -C /tmp/tmux --strip 1
|
||||
pushd /tmp/tmux
|
||||
[ -f autogen.sh ] && sh autogen.sh
|
||||
./configure && make
|
||||
sudo make install
|
||||
popd
|
||||
rm -rf /tmp/tmux*
|
||||
;;
|
||||
pacman)
|
||||
sudo pacman -S tmux
|
||||
;;
|
||||
esac
|
||||
|
||||
# symlink configuration
|
||||
lnsf $DIR/tmux.conf ~/.tmux.conf
|
||||
lnsf $DIR/config ~/.config/tmux
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
sudo apt install libevent-dev libncurses5-dev bison -y
|
||||
|
||||
TMUX_VER=3.1b
|
||||
#curl -L https://github.com/tmux/tmux/releases/download/$TMUX_VER/tmux-$TMUX_VER.tar.gz -o /tmp/tmux.tar.gz
|
||||
[ ! -f /tmp/tmux.tar.gz ] && curl -L https://gitee.com/klesh/tmux/repository/archive/$TMUX_VER?format=tar.gz -o /tmp/tmux.tar.gz
|
||||
rm -rf /tmp/tmux
|
||||
mkdir -p /tmp/tmux
|
||||
tar zxvf /tmp/tmux.tar.gz -C /tmp/tmux --strip 1
|
||||
pushd /tmp/tmux
|
||||
[ -f autogen.sh ] && sh autogen.sh
|
||||
./configure && make
|
||||
sudo make install
|
||||
popd
|
||||
rm -rf /tmp/tmux*
|
Loading…
Reference in New Issue
Block a user