From 850b880bf0eb724b9e7410bc3f6d8e1dde54bd82 Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Wed, 19 Jun 2024 08:19:50 -0500 Subject: [PATCH] update.sh: track more --- update.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/update.sh b/update.sh index 7036f87..5f52e77 100755 --- a/update.sh +++ b/update.sh @@ -3,7 +3,6 @@ # minimal dotfile manager # tracks files / copies them into the repo, sorted by hostname # -# note: assumes pwd is this repo before running this script set -u # array of files/dirs [relative to home] to include @@ -18,17 +17,18 @@ DOTS=( '.config/nvim/coc-settings.json' '.config/autostart-i3ipc.yml' '.config/sway/' + '.local/bin/note-taker.sh' # run by Kitty in a 'triplesplit' session, one of many of autostart 'wants' in '...-i3ipc.yml' above ) # to avoid hacky pwd/dirname stuff w/ $0 [for now?], inline the path to the repo where copies are held DOT_DIR="${HOME}/git/dot" # ensure the host running this script/updating dotfiles has a directory within the repo +# then, begin dotfile processing - ensure structure is retained, naively copy w/ rsync +# at the end/out of band: rely on Git to tell us about changes. TODO: reconsider, edge cases? auto commit/push? HOST_DIR="${DOT_DIR}/${HOSTNAME}" [ -d "$HOST_DIR" ] || mkdir -v "$HOST_DIR" -# begin dotfile processing - ensure structure is retained, naively copy w/ rsync. rely on Git to tell us about changes. -# TODO: reconsider, edge cases? for DOT in "${DOTS[@]}"; do echo "Copying '$HOME/$DOT' to '$HOST_DIR/${DOT}'" rsync -aqv "$HOME/$DOT" "$HOST_DIR/${DOT}" || echo "Couldn't copy '$DOT', got rc: $?"