From 8c9b39604c872dce2362a2c037ec55300d125e21 Mon Sep 17 00:00:00 2001 From: Christoph Heiss Date: Sat, 24 Dec 2022 16:33:48 +0100 Subject: [PATCH] update-files: Replace `cp` with `rsync` for excluding items Signed-off-by: Christoph Heiss --- update-files.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/update-files.sh b/update-files.sh index 2bfabb7..23a113c 100755 --- a/update-files.sh +++ b/update-files.sh @@ -5,10 +5,15 @@ set -euo pipefail cd "$(dirname "${BASH_SOURCE[0]}")" -cp -av $HOME/.alacritty.yml alacritty.yml -cp -av $HOME/.gitconfig gitconfig -cp -av $HOME/.latexmkrc latexmkrc -cp -av $HOME/.zshrc zshrc -cp -av $HOME/.config/nvim/init.vim nvimrc.vim +RSYNC="rsync --archive --info=name1" -cp -av $HOME/.config/tmux . +$RSYNC $HOME/.alacritty.yml alacritty.yml +$RSYNC $HOME/.gitconfig gitconfig +$RSYNC $HOME/.latexmkrc latexmkrc +$RSYNC $HOME/.zshrc zshrc + +$RSYNC --exclude plugins $HOME/.config/tmux . + +$RSYNC \ + --exclude autoload --exclude plugged --exclude session \ + $HOME/.config/nvim .