summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-06-08 09:48:10 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-06-08 09:48:10 +0900
commitfc5165c1be93c695023d79942d907c8227140a62 (patch)
treedca16e75b1b71b7fbadbf8e9270e5ea35b35264e
parent945a128577bda089d7b3d7510c9d4b4b69d0fe6e (diff)
modified bin/rbackupHEADmaster
-rwxr-xr-xar/.local/bin/rbackup11
1 files changed, 10 insertions, 1 deletions
diff --git a/ar/.local/bin/rbackup b/ar/.local/bin/rbackup
index 7ae89e5..8e3f75e 100755
--- a/ar/.local/bin/rbackup
+++ b/ar/.local/bin/rbackup
@@ -47,11 +47,20 @@ mount_luks() {
# Using a loop over space-separated strings instead of an array
sync_files() {
- for source in "$dot_path" "$git_path" "$pass_path" "$suck_path"; do
+ # top-level targets go directly under the backup path
+ for source in "$git_path" "$pass_path"; do
rsync -vrazPlu --exclude=".music.txt" --delete "$source" "$backup_path/" >/dev/null 2>&1 || {
echo "Failed to sync $(basename "$source")"
}
done
+
+ # dotfiles and suckless are stored under repos/
+ [ -d "$backup_path/repos" ] || mkdir -p "$backup_path/repos"
+ for source in "$dot_path" "$suck_path"; do
+ rsync -vrazPlu --exclude=".music.txt" --delete "$source" "$backup_path/repos/" >/dev/null 2>&1 || {
+ echo "Failed to sync $(basename "$source")"
+ }
+ done
}
sync_root() {