Kaynağa Gözat

Added tmux not found option

Daniel Gibbs 11 yıl önce
ebeveyn
işleme
98e7f20eca
1 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  1. 3 1
      functions/fn_distrodetails

+ 3 - 1
functions/fn_distrodetails

@@ -27,7 +27,9 @@ glibcv=$(ldd --version |grep ldd|awk '{print $NF}')
 
 
 # tmux version
 # tmux version
 # e.g: tmux 1.6
 # e.g: tmux 1.6
-if [ "$(tmux -V|sed "s/tmux //"|sed -n '1 p'|tr -cd [:digit:]|tail -c 3)" -lt "16" ]; then
+if [ -z $(command -v tmux) ]; then
+	tmuxv="\e[0;31mNOT INSTALLED!\e[0m"
+elif [ "$(tmux -V|sed "s/tmux //"|sed -n '1 p'|tr -cd [:digit:]|tail -c 3)" -lt "16" ]; then
 	tmuxv="$(tmux -V) (>= 1.6 required for console log)"
 	tmuxv="$(tmux -V) (>= 1.6 required for console log)"
 else
 else
 	tmuxv=$(tmux -V)
 	tmuxv=$(tmux -V)