30 lines
828 B
Bash
Executable File
30 lines
828 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
# 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"
|