diff options
| author | Don Williams <don.e.williams@gmail.com> | 2026-01-30 08:07:08 -0500 |
|---|---|---|
| committer | Don Williams <don.e.williams@gmail.com> | 2026-01-30 08:07:08 -0500 |
| commit | 949fd81f3f6fe89b297261b9d3c839423d172ba5 (patch) | |
| tree | 07d478d3bee7c1305ae1be964594caf9b7441501 /scripts/lib_copy.sh | |
| parent | c236929377350588d47bff1b510bfa7878bec290 (diff) | |
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
Diffstat (limited to 'scripts/lib_copy.sh')
| -rw-r--r-- | scripts/lib_copy.sh | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/scripts/lib_copy.sh b/scripts/lib_copy.sh index 331c6906..dd83007e 100644 --- a/scripts/lib_copy.sh +++ b/scripts/lib_copy.sh @@ -3,6 +3,7 @@ copy_phase1() { local log="$1" + local base="${DOTFILES_DIR:-.}" local dirs="fastfetch kitty rofi swaync" for DIR2 in $dirs; do local DIRPATH="$HOME/.config/$DIR2" @@ -16,7 +17,7 @@ copy_phase1() { BACKUP_DIR=$(get_backup_dirname) mv "$DIRPATH" "$DIRPATH-backup-$BACKUP_DIR" 2>&1 | tee -a "$log" echo -e "${NOTE:-[NOTE]} - Backed up $DIR2 to $DIRPATH-backup-$BACKUP_DIR." 2>&1 | tee -a "$log" - cp -r "config/$DIR2" "$HOME/.config/$DIR2" 2>&1 | tee -a "$log" + cp -r "$base/config/$DIR2" "$HOME/.config/$DIR2" 2>&1 | tee -a "$log" echo -e "${OK:-[OK]} - Replaced $DIR2 with new configuration." 2>&1 | tee -a "$log" if [ "$DIR2" = "rofi" ]; then if [ -d "$DIRPATH-backup-$BACKUP_DIR/themes" ]; then @@ -39,7 +40,7 @@ copy_phase1() { esac done else - cp -r "config/$DIR2" "$HOME/.config/$DIR2" 2>&1 | tee -a "$log" + cp -r "$base/config/$DIR2" "$HOME/.config/$DIR2" 2>&1 | tee -a "$log" echo -e "${OK:-[OK]} - Copy completed for ${YELLOW:-}$DIR2${RESET:-}" 2>&1 | tee -a "$log" fi done @@ -47,6 +48,7 @@ copy_phase1() { copy_waybar() { local log="$1" + local base="${DOTFILES_DIR:-.}" local DIRW="waybar" local DIRPATHw="$HOME/.config/$DIRW" if [ -d "$DIRPATHw" ]; then @@ -58,7 +60,7 @@ copy_waybar() { BACKUP_DIR=$(get_backup_dirname) cp -r "$DIRPATHw" "$DIRPATHw-backup-$BACKUP_DIR" 2>&1 | tee -a "$log" echo -e "${NOTE:-[NOTE]} - Backed up $DIRW to $DIRPATHw-backup-$BACKUP_DIR." 2>&1 | tee -a "$log" - rm -rf "$DIRPATHw" && cp -r "config/$DIRW" "$DIRPATHw" 2>&1 | tee -a "$log" + rm -rf "$DIRPATHw" && cp -r "$base/config/$DIRW" "$DIRPATHw" 2>&1 | tee -a "$log" for file in "config" "style.css"; do symlink="$DIRPATHw-backup-$BACKUP_DIR/$file" target_file="$DIRPATHw/$file" @@ -103,13 +105,14 @@ copy_waybar() { esac done else - cp -r "config/$DIRW" "$DIRPATHw" 2>&1 | tee -a "$log" + cp -r "$base/config/$DIRW" "$DIRPATHw" 2>&1 | tee -a "$log" echo -e "${OK:-[OK]} - Copy completed for ${YELLOW:-}$DIRW${RESET:-}" 2>&1 | tee -a "$log" fi } copy_phase2() { local log="$1" + local base="${DOTFILES_DIR:-.}" local DIR="btop cava hypr Kvantum qt5ct qt6ct swappy wallust wlogout" for DIR_NAME in $DIR; do local DIRPATH="$HOME/.config/$DIR_NAME" @@ -118,8 +121,8 @@ copy_phase2() { BACKUP_DIR=$(get_backup_dirname) mv "$DIRPATH" "$DIRPATH-backup-$BACKUP_DIR" 2>&1 | tee -a "$log" fi - if [ -d "config/$DIR_NAME" ]; then - cp -r "config/$DIR_NAME/" "$HOME/.config/$DIR_NAME" 2>&1 | tee -a "$log" + if [ -d "$base/config/$DIR_NAME" ]; then + cp -r "$base/config/$DIR_NAME/" "$HOME/.config/$DIR_NAME" 2>&1 | tee -a "$log" echo "${OK:-[OK]} - Copy of config for ${YELLOW:-}$DIR_NAME${RESET:-} completed!" 2>&1 | tee -a "$log" else echo "${ERROR:-[ERROR]} - Directory config/$DIR_NAME does not exist to copy." 2>&1 | tee -a "$log" |
