Updated config
This commit is contained in:
parent
e7fcea5835
commit
169221c7b2
4 changed files with 49 additions and 3 deletions
20
.config/fish/scripts/backup
Executable file
20
.config/fish/scripts/backup
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/fish
|
||||
set DIRECTORIES documents music pictures projects videos
|
||||
set EXCLUDES node_modules .cache .godot .svelte-kit
|
||||
set FLAGS -avz --delete
|
||||
set HOSTS $argv
|
||||
set USER (whoami)
|
||||
set DESTINATION "~/files/"
|
||||
|
||||
for exclude in $EXCLUDES
|
||||
set -a FLAGS --exclude $exclude
|
||||
end
|
||||
|
||||
for host in $HOSTS
|
||||
echo "[$host]"
|
||||
|
||||
for DIR in $DIRECTORIES
|
||||
echo "Backing up $DIR..."
|
||||
rsync $FLAGS ~/$DIR $USER@$host:$DESTINATION
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue