From 90e01eaea458fc7b038ea0dd28fce1685ac04b00 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Wed, 21 May 2025 22:52:41 +0200 Subject: [PATCH] Updated config --- .config/fish/config.fish | 2 +- .config/fish/scripts/backup | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.config/fish/config.fish b/.config/fish/config.fish index cfaea1c..2297bbd 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -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 diff --git a/.config/fish/scripts/backup b/.config/fish/scripts/backup index 626b4c8..82daca3 100755 --- a/.config/fish/scripts/backup +++ b/.config/fish/scripts/backup @@ -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 \ No newline at end of file