From efd9c2287f69e2bd8bff4ff5fdb7e77d506066b0 Mon Sep 17 00:00:00 2001 From: eKa Date: Wed, 18 Sep 2019 10:12:16 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=20=D1=83?= =?UTF-8?q?=D1=81=D1=82=D0=B0=D0=BD=D0=BE=D0=B2=D0=BE=D1=87=D0=BD=D1=8B?= =?UTF-8?q?=D0=B9=20=D1=81=D0=BA=D1=80=D0=B8=D0=BF=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/install.sh b/install.sh index a9bf588..85583ee 100755 --- a/install.sh +++ b/install.sh @@ -1 +1,26 @@ #!/bin/bash +# Backup existing configs +if [ -e "$HOME/.tmux.conf" ]; then + printf "Found existing .tmux.conf in your \$HOME directory. Will create a backup at $HOME/.tmux.conf.bak\n" +fi + +cp -f "$HOME/.tmux.conf" "$HOME/.tmux.conf.bak" 2>/dev/null || true + +if [ -e "$HOME/.zshrc" ]; then + printf "Found existing .zshrc in your \$HOME directory. Will create a backup at $HOME/.zshrc.bak\n" +fi + +cp -f "$HOME/.zshrc" "$HOME/.zshrc.bak" 2>/dev/null || true + +if [ -e "$HOME/.vimrc" ]; then + printf "Found existing .vimrc in your \$HOME directory. Will create a backup at $HOME/.vimrc.bak\n" +fi + +cp -f "$HOME/.vimrc" "$HOME/.vimrc.bak" 2>/dev/null || true + +# Create symlinks +ln -sf .dots/tmux/local.conf "$HOME"/.tmux.conf +ln -sf .dots/zsh/zshrc "$HOME"/.zshrc +ln -sf .dots/vim/vimrc "$HOME"/.vimrc + +printf "OK: Completed\n"