summaryrefslogtreecommitdiff
path: root/ar
diff options
context:
space:
mode:
Diffstat (limited to 'ar')
-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() {