From c6a85140d2578a7d3ea009cb8074049c98c8da4e Mon Sep 17 00:00:00 2001 From: Don Williams Date: Thu, 22 Jan 2026 19:10:39 -0500 Subject: Added version check to update helper to make sure dedupe is run On branch development Your branch is ahead of 'origin/development' by 2 commits. (use "git push" to publish your local commits) Changes to be committed: modified: scripts/lib_update.sh --- scripts/lib_update.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'scripts') diff --git a/scripts/lib_update.sh b/scripts/lib_update.sh index 0a70dff0..be0b8a0a 100644 --- a/scripts/lib_update.sh +++ b/scripts/lib_update.sh @@ -77,6 +77,20 @@ run_repo_update() { echo " Pull status : $( [ $pull_status -eq 0 ] && echo success || echo failure )" | tee -a "$log_file" echo "----------------------------------------" | tee -a "$log_file" + # Also run the UserConfigs duplicate cleanup for existing installs, + # using the same version gating as the main copy workflow (<= v2.3.19). + if declare -f get_installed_dotfiles_version >/dev/null 2>&1 \ + && declare -f cleanup_duplicate_userconfigs >/dev/null 2>&1; then + local installed_version + installed_version=$(get_installed_dotfiles_version) + if [ -n "$installed_version" ]; then + echo "${INFO:-[INFO]} Checking for duplicate UserConfigs entries after repo update (detected v$installed_version)..." | tee -a "$log_file" + cleanup_duplicate_userconfigs "$installed_version" "$log_file" + else + echo "${NOTE:-[NOTE]} Skipping UserConfigs duplicate cleanup; installed version could not be detected." | tee -a "$log_file" + fi + fi + read -n1 -s -r -p "Press any key to return to the main menu..." echo -- cgit v1.2.3