From 949fd81f3f6fe89b297261b9d3c839423d172ba5 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Fri, 30 Jan 2026 08:07:08 -0500 Subject: NixOS relative pathing wasn't working `cwd` issues ``` [OK] You have chosen < 1440p resolution. sed: can't read config/kitty/kitty.conf: No such file or directory [NOTE] By default, KooL's Dots are configured in 24H clock format. [ACTION] Do you want to change to 12H (AM/PM) clock format? (y/n): y sed: can't read config/waybar/Modules: No such file or directory sed: can't read config/waybar/Modules: No such file or directory sed: can't read config/waybar/Modules: No such file or directory sed: can't read config/waybar/Modules: No such file or directory sed: can't read config/waybar/Modules: No such file or directory sed: can't read config/waybar/Modules: No such file or directory sed: can't read config/waybar/Modules: No such file or directory sed: can't read config/waybar/Modules: No such file or directory sed: can't read config/waybar/Modules: No such file or directory [WARN] hyprlock template not found; skipping 12H lock format edits [NOTE] Express mode: skipping SDDM 12H edits to avoid sudo prompts. [OK] 12H format set on waybar clocks succesfully. [INFO] - copying dotfiles first part cp: cannot stat 'config/fastfetch': No such file or directory [OK] - Copy completed for fastfetch [INFO] Found kitty config found in ~/.config/ [ACTION] Do you want to replace kitty config? (y/n): y [NOTE] - Backed up kitty to /home/dwilliams/.config/kitty-backup-back-up_0130_0800. cp: cannot stat 'config/kitty': No such file or directory [OK] - Replaced kitty with new configuration. [INFO] Found rofi config found in ~/.config/ [ACTION] Do you want to replace rofi config? (y/n): y [NOTE] - Backed up rofi to /home/dwilliams/.config/rofi-backup-back-up_0130_0800. cp: cannot stat 'config/rofi': No such file or directory [OK] - Replaced rofi with new configuration. ``` On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: copy.sh modified: scripts/lib_apps.sh modified: scripts/lib_copy.sh modified: scripts/lib_prompts.sh --- copy.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'copy.sh') diff --git a/copy.sh b/copy.sh index e9b09e9e..fc3f38b8 100755 --- a/copy.sh +++ b/copy.sh @@ -53,6 +53,8 @@ SKY_BLUE="$(tput setaf 6)" RESET="$(tput sgr0)" MIN_EXPRESS_VERSION="2.3.18" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +DOTFILES_DIR="$SCRIPT_DIR" +export DOTFILES_DIR MENU_HELPER="$SCRIPT_DIR/scripts/copy_menu.sh" BACKUP_HELPER="$SCRIPT_DIR/scripts/lib_backup.sh" DETECT_HELPER="$SCRIPT_DIR/scripts/lib_detect.sh" @@ -107,6 +109,9 @@ else exit 1 fi +# Ensure we operate from the dotfiles root so relative paths resolve. +cd "$SCRIPT_DIR" || { echo "${ERROR} Failed to cd to $SCRIPT_DIR"; exit 1; } + version_gte() { [ "$1" = "$(echo -e "$1\n$2" | sort -V | tail -n1)" ] } -- cgit v1.2.3