-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·46 lines (41 loc) · 1.15 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash -
# Unoffical Bash "strict mode"
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
# Install tmux
echo "Installing tmux configuration..."
echo
if [[ ! -z "$TMUX" ]] && [[ -n "$TMUX" ]]; then
echo
echo "=====NOTICE==========================================================="
echo "Running this script inside tmux session will kill your tmux session!.."
echo "This is needed for installing tmux plugins"
echo "======================================================================"
echo
read -p "Are you okay with killing your current tmux session? [y/n]: " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo
echo "Installing... tmux will exit..."
echo
else
echo
echo "Sayonara!..."
echo
exit 1
fi
fi
echo ln -s ${PWD}/tmux.conf ~/.tmux.conf
ln -s ${PWD}/tmux.conf ~/.tmux.conf
echo
echo "Installing plugins"
echo
# start a server but don't attach to it
tmux start-server
# create a new session but don't attach to it either
tmux new-session -d
# install the plugins
~/.tmux/plugins/tpm/scripts/install_plugins.sh
# killing the server is not required, I guess
tmux kill-server
echo
echo "Done..."