update.sh: dir guidance RE: rsync+'/' for entries
This commit is contained in:
parent
0336b62c26
commit
a6bde8a373
1 changed files with 6 additions and 5 deletions
11
update.sh
11
update.sh
|
@ -7,15 +7,17 @@
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
# array of files/dirs [relative to home] to include
|
# array of files/dirs [relative to home] to include
|
||||||
|
# NOTE: use a trailing slash to avoid directory nesting
|
||||||
DOTS=(
|
DOTS=(
|
||||||
'.bashrc'
|
'.bashrc'
|
||||||
# '.shell_aliases' # needs cleaned up first
|
# '.shell_aliases' # needs cleaned up first
|
||||||
'.vimrc'
|
'.vimrc'
|
||||||
'.config/fuzzel'
|
'.config/fuzzel/'
|
||||||
|
'.config/kitty/'
|
||||||
'.config/nvim/init.vim'
|
'.config/nvim/init.vim'
|
||||||
'.config/nvim/coc-settings.json'
|
'.config/nvim/coc-settings.json'
|
||||||
'.config/autostart-i3ipc.yml'
|
'.config/autostart-i3ipc.yml'
|
||||||
'.config/sway'
|
'.config/sway/'
|
||||||
)
|
)
|
||||||
|
|
||||||
# to avoid hacky pwd/dirname stuff w/ $0 [for now?], inline the path to the repo where copies are held
|
# to avoid hacky pwd/dirname stuff w/ $0 [for now?], inline the path to the repo where copies are held
|
||||||
|
@ -28,7 +30,6 @@ HOST_DIR="${DOT_DIR}/${HOSTNAME}"
|
||||||
# begin dotfile processing - ensure structure is retained, naively copy w/ rsync. rely on Git to tell us about changes.
|
# begin dotfile processing - ensure structure is retained, naively copy w/ rsync. rely on Git to tell us about changes.
|
||||||
# TODO: reconsider, edge cases?
|
# TODO: reconsider, edge cases?
|
||||||
for DOT in "${DOTS[@]}"; do
|
for DOT in "${DOTS[@]}"; do
|
||||||
DEST="${HOST_DIR}/$DOT"
|
echo "Copying '$HOME/$DOT' to '$HOST_DIR/${DOT}'"
|
||||||
echo "Copying '$HOME/$DOT' to '$DEST'"
|
rsync -aqv "$HOME/$DOT" "$HOST_DIR/${DOT}" || echo "Couldn't copy '$DOT', got rc: $?"
|
||||||
rsync -aqv "$HOME/$DOT" "$DEST" || echo "Couldn't copy '$DOT', got rc: $?"
|
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue