Updated config

This commit is contained in:
Eduard Urbach 2025-05-21 22:52:41 +02:00
parent 6df433b2fd
commit 90e01eaea4
No known key found for this signature in database
GPG key ID: C874F672B1AF20C0
2 changed files with 12 additions and 6 deletions

View file

@ -10,7 +10,7 @@ while read -la line
set -l value (string trim $keyval[2..])
set -l value (eval echo $value)
set -xg $key $value
end < .env
end < ~/.env
# Add scripts to PATH
fish_add_path $XDG_CONFIG_HOME/fish/scripts

View file

@ -1,7 +1,7 @@
#!/bin/fish
set DIRECTORIES documents music pictures projects videos
set EXCLUDES node_modules .cache .godot .svelte-kit
set FLAGS -avz --delete
set FLAGS --archive --compress --delete --quiet
set HOSTS $argv
set USER (whoami)
set DESTINATION "~/files/"
@ -11,10 +11,16 @@ for exclude in $EXCLUDES
end
for host in $HOSTS
echo "[$host]"
set_color yellow
echo " $host"
for DIR in $DIRECTORIES
echo "Backing up $DIR..."
rsync $FLAGS ~/$DIR $USER@$host:$DESTINATION
for dir in $DIRECTORIES
set_color blue
echo "  $dir"
set_color normal
rsync $FLAGS ~/$dir $host:$DESTINATION
end
echo ""
end