From a988f706e0080cde8aad3966948ac68ea0075da7 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Mon, 12 Jan 2026 10:12:20 -0500 Subject: Added update dotfiles option to men On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: copy.sh modified: scripts/copy_menu.sh new file: scripts/lib_update.sh --- copy.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'copy.sh') diff --git a/copy.sh b/copy.sh index 8df2532d..def8b209 100755 --- a/copy.sh +++ b/copy.sh @@ -6,6 +6,7 @@ # # Layout (high-level; future modularization targets): # - Constants/colors, helper sourcing (copy_menu.sh, lib_backup.sh, lib_detect.sh, lib_prompts.sh, lib_apps.sh, lib_copy.sh). +# - New update helper (lib_update.sh) provides menu-driven repo update: verifies Hyprland-Dots root, stashes changes, git pull, logs, summarizes, waits for keypress. # - Version helpers and CLI parsing (install/upgrade/express). # - Safety checks (non-root), banners/notices. # - Environment/distro checks and warnings. @@ -57,6 +58,7 @@ DETECT_HELPER="$SCRIPT_DIR/scripts/lib_detect.sh" PROMPTS_HELPER="$SCRIPT_DIR/scripts/lib_prompts.sh" APPS_HELPER="$SCRIPT_DIR/scripts/lib_apps.sh" COPY_HELPER="$SCRIPT_DIR/scripts/lib_copy.sh" +UPDATE_HELPER="$SCRIPT_DIR/scripts/lib_update.sh" if [ -f "$MENU_HELPER" ]; then # shellcheck source=./scripts/copy_menu.sh . "$MENU_HELPER" @@ -96,6 +98,13 @@ else echo "${ERROR} Copy helper not found at $COPY_HELPER. Exiting." exit 1 fi +if [ -f "$UPDATE_HELPER" ]; then + # shellcheck source=./scripts/lib_update.sh + . "$UPDATE_HELPER" +else + echo "${ERROR} Update helper not found at $UPDATE_HELPER. Exiting." + exit 1 +fi version_gte() { [ "$1" = "$(echo -e "$1\n$2" | sort -V | tail -n1)" ] @@ -193,6 +202,11 @@ if [ -z "$RUN_MODE" ]; then UPGRADE_MODE=1 EXPRESS_MODE=1 ;; + update) + run_repo_update "$SCRIPT_DIR" + # After update, continue showing the menu without exiting + continue + ;; quit) echo "${NOTE} Exiting per user selection." exit 0 -- cgit v1.2.3