浏览代码

Check tmux presence before installing files

Taddeus Kroes 2 周之前
父节点
当前提交
f68b0211ce
共有 1 个文件被更改,包括 5 次插入 和 3 次删除
  1. 5 3
      install.sh

+ 5 - 3
install.sh

@@ -19,9 +19,11 @@ ln -sf $DIR/gitconfig ~/.gitconfig
 ln -sf $DIR/bashrc ~/.bashrc
 
 # tmux
-ln -sf $DIR/tmux.conf ~/.tmux.conf
-if [ $INSTALL_ALL -eq 1 ]; then
-    ln -sf $DIR/tmux.clear-keys.conf ~/.tmux.clear-keys.conf
+if which tmux >/dev/null; then
+    ln -sf $DIR/tmux.conf ~/.tmux.conf
+    if [ $INSTALL_ALL -eq 1 ]; then
+        ln -sf $DIR/tmux.clear-keys.conf ~/.tmux.clear-keys.conf
+    fi
 fi
 
 # vim