Updated config
This commit is contained in:
parent
c632417b1f
commit
8fcda55cbd
2 changed files with 12 additions and 6 deletions
|
@ -10,7 +10,7 @@ while read -la line
|
||||||
set -l value (string trim $keyval[2..])
|
set -l value (string trim $keyval[2..])
|
||||||
set -l value (eval echo $value)
|
set -l value (eval echo $value)
|
||||||
set -xg $key $value
|
set -xg $key $value
|
||||||
end < .env
|
end < ~/.env
|
||||||
|
|
||||||
# Add scripts to PATH
|
# Add scripts to PATH
|
||||||
fish_add_path $XDG_CONFIG_HOME/fish/scripts
|
fish_add_path $XDG_CONFIG_HOME/fish/scripts
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/fish
|
#!/bin/fish
|
||||||
set DIRECTORIES documents music pictures projects videos
|
set DIRECTORIES documents music pictures projects videos
|
||||||
set EXCLUDES node_modules .cache .godot .svelte-kit
|
set EXCLUDES node_modules .cache .godot .svelte-kit
|
||||||
set FLAGS -avz --delete
|
set FLAGS --archive --compress --delete --quiet
|
||||||
set HOSTS $argv
|
set HOSTS $argv
|
||||||
set USER (whoami)
|
set USER (whoami)
|
||||||
set DESTINATION "~/files/"
|
set DESTINATION "~/files/"
|
||||||
|
@ -11,10 +11,16 @@ for exclude in $EXCLUDES
|
||||||
end
|
end
|
||||||
|
|
||||||
for host in $HOSTS
|
for host in $HOSTS
|
||||||
echo "[$host]"
|
set_color yellow
|
||||||
|
echo " $host"
|
||||||
|
|
||||||
for DIR in $DIRECTORIES
|
for dir in $DIRECTORIES
|
||||||
echo "Backing up $DIR..."
|
set_color blue
|
||||||
rsync $FLAGS ~/$DIR $USER@$host:$DESTINATION
|
echo " $dir"
|
||||||
|
|
||||||
|
set_color normal
|
||||||
|
rsync $FLAGS ~/$dir $host:$DESTINATION
|
||||||
end
|
end
|
||||||
|
|
||||||
|
echo ""
|
||||||
end
|
end
|
Loading…
Add table
Add a link
Reference in a new issue