aboutsummaryrefslogtreecommitdiffstats
path: root/copy.sh
diff options
context:
space:
mode:
authorDon Williams <don.e.williams@gmail.com>2026-07-22 03:42:03 -0400
committerPinapelz <yukais@pinapelz.com>2026-08-29 21:40:35 -0700
commit6a206d235b0b523c68c4914f18a05cdb7a776aff (patch)
tree38fdf7b73e2fed8be1d1d6800046118e93f0a334 /copy.sh
parent556386478890a563418038db19ad16d6fcd48a1e (diff)
Upd copy.sh to preserve existing user files
Also removed manual restore for kitty/ghossty since they are UserConfigs now copy.sh will seed the new kitty/ghostty/hyprview layout selector if not there during first upgrade Signed-off-by: Don Williams <don.e.williams@gmail.com> Please enter the commit message for your changes. Lines starting with '#' will be ignored, and an empty message aborts the commit. On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: copy.sh modified: scripts/lib_copy.sh
Diffstat (limited to 'copy.sh')
-rwxr-xr-xcopy.sh36
1 files changed, 21 insertions, 15 deletions
diff --git a/copy.sh b/copy.sh
index a80416ed..3f1b88e0 100755
--- a/copy.sh
+++ b/copy.sh
@@ -503,6 +503,8 @@ if [ ! -d "${XDG_CONFIG_HOME:-$HOME/.config}" ]; then
echo "${ERROR} - ${XDG_CONFIG_HOME:-$HOME/.config} directory does not exist. Creating it now."
mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}" && echo "Directory created successfully." || echo "Failed to create directory."
fi
+seed_upgrade_userconfigs "$LOG"
+capture_upgrade_runtime_selection_state
printf "${INFO} - copying dotfiles ${SKY_BLUE}first${RESET} part\n"
copy_phase1 "$LOG" "$RUN_MODE"
@@ -693,8 +695,6 @@ printf "\\n%.0s" {1..1}
restore_user_scripts "$LOG" "$EXPRESS_MODE"
printf "\n%.0s" {1..1}
-restore_terminal_configs "$LOG" "$EXPRESS_MODE"
-printf "\\n%.0s" {1..1}
restore_hypr_files "$LOG" "$EXPRESS_MODE"
printf "\n%.0s" {1..1}
@@ -769,17 +769,21 @@ fi
# - If the symlink points somewhere else (or is broken), reset it to the new default.
WAYBAR_CONFIG_LINK="${XDG_CONFIG_HOME:-$HOME/.config}/waybar/config"
WAYBAR_CONFIG_TARGET="$config_file"
-if [ -e "$WAYBAR_CONFIG_TARGET" ]; then
- if [ -L "$WAYBAR_CONFIG_LINK" ]; then
- current_target=$(readlink "$WAYBAR_CONFIG_LINK" || true)
- if [ "$current_target" != "$WAYBAR_CONFIG_TARGET" ] || [ ! -e "$WAYBAR_CONFIG_LINK" ]; then
+if [ "$RUN_MODE" = "install" ]; then
+ if [ -e "$WAYBAR_CONFIG_TARGET" ]; then
+ if [ -L "$WAYBAR_CONFIG_LINK" ]; then
+ current_target=$(readlink "$WAYBAR_CONFIG_LINK" || true)
+ if [ "$current_target" != "$WAYBAR_CONFIG_TARGET" ] || [ ! -e "$WAYBAR_CONFIG_LINK" ]; then
+ ln -sf "$WAYBAR_CONFIG_TARGET" "$WAYBAR_CONFIG_LINK" 2>&1 | tee -a "$LOG"
+ fi
+ else
ln -sf "$WAYBAR_CONFIG_TARGET" "$WAYBAR_CONFIG_LINK" 2>&1 | tee -a "$LOG"
fi
else
- ln -sf "$WAYBAR_CONFIG_TARGET" "$WAYBAR_CONFIG_LINK" 2>&1 | tee -a "$LOG"
+ echo "${WARN} Waybar default config target not found at $WAYBAR_CONFIG_TARGET; leaving $WAYBAR_CONFIG_LINK as-is." 2>&1 | tee -a "$LOG"
fi
else
- echo "${WARN} Waybar default config target not found at $WAYBAR_CONFIG_TARGET; leaving $WAYBAR_CONFIG_LINK as-is." 2>&1 | tee -a "$LOG"
+ restore_upgrade_runtime_selection_state "$LOG"
fi
# Remove inappropriate waybar configs
@@ -858,17 +862,19 @@ fi
# - If the symlink points somewhere else (or is broken), reset it to the new default.
WAYBAR_STYLE_LINK="${XDG_CONFIG_HOME:-$HOME/.config}/waybar/style.css"
WAYBAR_STYLE_TARGET="$waybar_style"
-if [ -e "$WAYBAR_STYLE_TARGET" ]; then
- if [ -L "$WAYBAR_STYLE_LINK" ]; then
- current_target=$(readlink "$WAYBAR_STYLE_LINK" || true)
- if [ "$current_target" != "$WAYBAR_STYLE_TARGET" ] || [ ! -e "$WAYBAR_STYLE_LINK" ]; then
+if [ "$RUN_MODE" = "install" ]; then
+ if [ -e "$WAYBAR_STYLE_TARGET" ]; then
+ if [ -L "$WAYBAR_STYLE_LINK" ]; then
+ current_target=$(readlink "$WAYBAR_STYLE_LINK" || true)
+ if [ "$current_target" != "$WAYBAR_STYLE_TARGET" ] || [ ! -e "$WAYBAR_STYLE_LINK" ]; then
+ ln -sf "$WAYBAR_STYLE_TARGET" "$WAYBAR_STYLE_LINK" 2>&1 | tee -a "$LOG"
+ fi
+ else
ln -sf "$WAYBAR_STYLE_TARGET" "$WAYBAR_STYLE_LINK" 2>&1 | tee -a "$LOG"
fi
else
- ln -sf "$WAYBAR_STYLE_TARGET" "$WAYBAR_STYLE_LINK" 2>&1 | tee -a "$LOG"
+ echo "${WARN} Waybar default style target not found at $WAYBAR_STYLE_TARGET; leaving $WAYBAR_STYLE_LINK as-is." 2>&1 | tee -a "$LOG"
fi
-else
- echo "${WARN} Waybar default style target not found at $WAYBAR_STYLE_TARGET; leaving $WAYBAR_STYLE_LINK as-is." 2>&1 | tee -a "$LOG"
fi
printf "\n%.0s" {1..1}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage