From c236929377350588d47bff1b510bfa7878bec290 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Fri, 30 Jan 2026 07:58:30 -0500 Subject: Adjusting copy.sh to use LOGS_DIR vs. Copy-Logs hardcoded On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: copy.sh --- copy.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/copy.sh b/copy.sh index c1752f9d..e9b09e9e 100755 --- a/copy.sh +++ b/copy.sh @@ -281,16 +281,21 @@ echo "${WARNING}A T T E N T I O N !${RESET}" echo "${MAGENTA}Kindly visit KooL Hyprland Own Wiki for changelogs${RESET}" printf "\n%.0s" {1..1} -# Create Directory for Copy Logs -if [ ! -d Copy-Logs ]; then - mkdir Copy-Logs +# Create Directory for Copy Logs (use script dir to avoid CWD issues) +LOG_DIR="$SCRIPT_DIR/Copy-Logs" +if [ ! -d "$LOG_DIR" ]; then + mkdir -p "$LOG_DIR" fi # Set the name of the log file to include the current date and time -LOG="Copy-Logs/install-$(date +%d-%H%M%S)_dotfiles.log" +LOG="$LOG_DIR/install-$(date +%d-%H%M%S)_dotfiles.log" -# update home directories -xdg-user-dirs-update 2>&1 | tee -a "$LOG" || true +# update home directories (guard if command missing) +if command -v xdg-user-dirs-update >/dev/null 2>&1; then + xdg-user-dirs-update 2>&1 | tee -a "$LOG" || true +else + echo "${WARN} xdg-user-dirs-update not found; skipping home dir update." 2>&1 | tee -a "$LOG" +fi echo "${INFO} Selected workflow: ${RUN_MODE}" 2>&1 | tee -a "$LOG" if [ "$UPGRADE_MODE" -eq 1 ]; then echo "${INFO} Upgrade mode enabled." 2>&1 | tee -a "$LOG" -- cgit v1.2.3