From ff1e6fb0e529fbae01c75cd7abe00605130a0f96 Mon Sep 17 00:00:00 2001 From: brockar Date: Thu, 22 Jan 2026 20:56:44 -0300 Subject: fix: check current version --- copy.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'copy.sh') diff --git a/copy.sh b/copy.sh index b061f4ac..d2c507ce 100755 --- a/copy.sh +++ b/copy.sh @@ -167,6 +167,7 @@ while [[ $# -gt 0 ]]; do esac shift done +INSTALLED_VERSION=$(get_installed_dotfiles_version) EXPRESS_SUPPORTED=0 if express_supported; then EXPRESS_SUPPORTED=1 @@ -479,7 +480,7 @@ printf "\n%.0s" {1..1} restore_hypr_assets "$LOG" "$EXPRESS_MODE" printf "\n%.0s" {1..1} -restore_user_configs "$LOG" "$EXPRESS_MODE" +restore_user_configs "$LOG" "$EXPRESS_MODE" "$INSTALLED_VERSION" printf "\n%.0s" {1..1} restore_user_scripts "$LOG" "$EXPRESS_MODE" -- cgit v1.2.3 From 2088bdc2b5ef8c2823e6f2e4997871818417672e Mon Sep 17 00:00:00 2001 From: Don Williams Date: Thu, 22 Jan 2026 19:23:58 -0500 Subject: fix: UserConfigs dedupe handling for express/update --- copy.sh | 13 +++++++++---- scripts/lib_copy.sh | 11 ++++++++--- 2 files changed, 17 insertions(+), 7 deletions(-) (limited to 'copy.sh') diff --git a/copy.sh b/copy.sh index d2c507ce..90dc1b83 100755 --- a/copy.sh +++ b/copy.sh @@ -410,7 +410,12 @@ if command -v ags >/dev/null 2>&1; then fi fi -printf "\n%.0s" {1..1} +printf "\\n%.0s" {1..1} + +# Capture installed dotfiles version at the start of the workflow so we +# can apply cleanup rules based on the pre-upgrade state, even if a newer +# version marker is copied in later. +INSTALLED_VERSION_AT_START="$(get_installed_dotfiles_version || true)" # quickshell (ags alternative) # Check if quickshell is installed @@ -478,10 +483,10 @@ fi printf "\n%.0s" {1..1} restore_hypr_assets "$LOG" "$EXPRESS_MODE" -printf "\n%.0s" {1..1} +printf "\\n%.0s" {1..1} -restore_user_configs "$LOG" "$EXPRESS_MODE" "$INSTALLED_VERSION" -printf "\n%.0s" {1..1} +restore_user_configs "$LOG" "$EXPRESS_MODE" "$INSTALLED_VERSION_AT_START" +printf "\\n%.0s" {1..1} restore_user_scripts "$LOG" "$EXPRESS_MODE" printf "\n%.0s" {1..1} diff --git a/scripts/lib_copy.sh b/scripts/lib_copy.sh index ace6f4d7..331c6906 100644 --- a/scripts/lib_copy.sh +++ b/scripts/lib_copy.sh @@ -427,9 +427,14 @@ restore_user_configs() { fi # Always run de-dupe based on the installed dotfiles version so that - # express mode and standard mode behave consistently. - local detected_version - detected_version=$(get_installed_dotfiles_version) + # express mode and standard mode behave consistently. Prefer the + # pre-upgrade version (old_version) if provided so we still clean up + # legacy duplicates when upgrading to a newer release that no longer + # needs the fix. + local detected_version="$old_version" + if [ -z "$detected_version" ]; then + detected_version=$(get_installed_dotfiles_version) + fi if [ -n "$detected_version" ]; then cleanup_duplicate_userconfigs "$detected_version" "$log" fi -- cgit v1.2.3