diff options
| author | JaKooLit <ejhay.games@gmail.com> | 2025-02-23 09:44:55 +0900 |
|---|---|---|
| committer | JaKooLit <ejhay.games@gmail.com> | 2025-02-23 09:44:55 +0900 |
| commit | 4363e9c1a995b82db5b2c96e58dc64e1fd81bb34 (patch) | |
| tree | 5aa2a2d88a7b3efad7d33aded67d90cecf8df94c | |
| parent | 4e622c1766d19737098b28f1a74c7a79cafcbf9e (diff) | |
anothe copy.sh changes for waybar and rofi handling
| -rwxr-xr-x | copy.sh | 34 |
1 files changed, 18 insertions, 16 deletions
@@ -507,29 +507,31 @@ for DIR2 in $DIRS; do echo -e "${OK} - previous waybar configs and styles restored automatically" 2>&1 | tee -a "$LOG" - # Optionally restore other waybar configuration and style files if present - find "$DIRPATH-backup-$BACKUP_DIR/configs" -type f -exec sh -c ' - echo "Copying {} to $HOME/.config/waybar/configs/" >> "$LOG" - cp -n "{}" "$HOME/.config/waybar/configs/" - ' \; || true + # Optionally restore other waybar configuration and style files if present + for file in "$DIRPATH-backup-$BACKUP_DIR/configs"/*; do + [ -e "$file" ] || continue # Skip if no files are found + echo "Copying $file to $HOME/.config/waybar/configs/" >> "$LOG" + cp -n "$file" "$HOME/.config/waybar/configs/" + done || true - find "$DIRPATH-backup-$BACKUP_DIR/style" -type f -exec sh -c ' - echo "Copying {} to $HOME/.config/waybar/style/" >> "$LOG" - cp -n "{}" "$HOME/.config/waybar/style/" - ' \; || true + for file in "$DIRPATH-backup-$BACKUP_DIR/style"/*; do + [ -e "$file" ] || continue # Skip if no files are found + echo "Copying $file to $HOME/.config/waybar/style/" >> "$LOG" + cp -n "$file" "$HOME/.config/waybar/style/" + done || true fi - - + # Restoring rofi themes directory unique themes if [ "$DIR2" = "rofi" ]; then if [ -d "$DIRPATH-backup-$BACKUP_DIR/themes" ]; then - find "$DIRPATH-backup-$BACKUP_DIR/themes" -type f -exec sh -c ' - echo "Copying {} to $HOME/.config/rofi/themes/" >> "$LOG" - cp -n "{}" "$HOME/.config/rofi/themes/" - ' \; || true + for file in "$DIRPATH-backup-$BACKUP_DIR/themes"/*; do + [ -e "$file" ] || continue # Skip if no files are found + echo "Copying $file to $HOME/.config/rofi/themes/" >> "$LOG" + cp -n "$file" "$HOME/.config/rofi/themes/" + done || true fi fi - + break ;; [Nn]* ) |
