home/.config/fish/scripts/backup
2025-05-31 23:51:11 +02:00

26 lines
No EOL
511 B
Fish
Executable file

#!/usr/bin/fish
set DIRECTORIES documents music pictures projects videos
set EXCLUDES node_modules .cache .godot .svelte-kit
set FLAGS --archive --compress --delete --human-readable --progress
set HOSTS $argv
set USER (whoami)
set DESTINATION "~/"
for exclude in $EXCLUDES
set -a FLAGS --exclude $exclude
end
for host in $HOSTS
set_color yellow
echo "$host"
for dir in $DIRECTORIES
set_color blue
echo "$dir"
set_color normal
rsync $FLAGS ~/$dir $host:$DESTINATION
end
echo ""
end