aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaKooLit <ejhay.games@gmail.com>2025-02-21 22:12:09 +0900
committerJaKooLit <ejhay.games@gmail.com>2025-02-21 22:12:09 +0900
commit32954ef25b2eb8081587e7ea9e3c6e4c5388cd57 (patch)
tree32b0f34e4df81447b135ef1983a14071e58b4007
parentd676acab0742932e0f52f4816a308abc043eec30 (diff)
updated copy.sh
-rwxr-xr-xcopy.sh42
1 files changed, 22 insertions, 20 deletions
diff --git a/copy.sh b/copy.sh
index 3fdd7f25..b1344b2b 100755
--- a/copy.sh
+++ b/copy.sh
@@ -583,29 +583,31 @@ HYPR_DIR="$HOME/.config/hypr"
BACKUP_DIR=$(get_backup_dirname)
BACKUP_HYPR_PATH="$HYPR_DIR-backup-$BACKUP_DIR"
-echo -e "\n${NOTE} Restoring ${SKY_BLUE}Animations & Monitor Profiles${RESET} directories into ${YELLOW}$HYPR_DIR${RESET}..."
-
-DIR_B=("Monitor_Profiles" "animations")
-# Restore directories automatically
-for DIR_RESTORE in "${DIR_B[@]}"; do
- BACKUP_SUBDIR="$BACKUP_HYPR_PATH/$DIR_RESTORE"
+if [ -d "$BACKUP_HYPR_PATH" ]; then
+ echo -e "\n${NOTE} Restoring ${SKY_BLUE}Animations & Monitor Profiles${RESET} directories into ${YELLOW}$HYPR_DIR${RESET}..."
- if [ -d "$BACKUP_SUBDIR" ]; then
- cp -r "$BACKUP_SUBDIR" "$HYPR_DIR/"
- echo "${OK} - Restored directory: ${MAGENTA}$DIR_RESTORE${RESET}" 2>&1 | tee -a "$LOG"
- fi
-done
+ DIR_B=("Monitor_Profiles" "animations")
+ # Restore directories automatically
+ for DIR_RESTORE in "${DIR_B[@]}"; do
+ BACKUP_SUBDIR="$BACKUP_HYPR_PATH/$DIR_RESTORE"
+
+ if [ -d "$BACKUP_SUBDIR" ]; then
+ cp -r "$BACKUP_SUBDIR" "$HYPR_DIR/"
+ echo "${OK} - Restored directory: ${MAGENTA}$DIR_RESTORE${RESET}" 2>&1 | tee -a "$LOG"
+ fi
+ done
-# Restore files automatically
-FILE_B=("monitors.conf" "workspaces.conf")
-for FILE_RESTORE in "${FILE_B[@]}"; do
- BACKUP_FILE="$BACKUP_HYPR_PATH/$FILE_RESTORE"
+ # Restore files automatically
+ FILE_B=("monitors.conf" "workspaces.conf")
+ for FILE_RESTORE in "${FILE_B[@]}"; do
+ BACKUP_FILE="$BACKUP_HYPR_PATH/$FILE_RESTORE"
- if [ -f "$BACKUP_FILE" ]; then
- cp "$BACKUP_FILE" "$HYPR_DIR/$FILE_RESTORE"
- echo "${OK} - Restored file: ${MAGENTA}$FILE_RESTORE${RESET}" 2>&1 | tee -a "$LOG"
- fi
-done
+ if [ -f "$BACKUP_FILE" ]; then
+ cp "$BACKUP_FILE" "$HYPR_DIR/$FILE_RESTORE"
+ echo "${OK} - Restored file: ${MAGENTA}$FILE_RESTORE${RESET}" 2>&1 | tee -a "$LOG"
+ fi
+ done
+fi
printf "\n%.0s" {1..1}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage