From 68461ffd5368b40d6b52a19b0c6e7252b182f69d Mon Sep 17 00:00:00 2001 From: RGBCube Date: Fri, 19 Jan 2024 17:15:39 +0300 Subject: [PATCH] Use rsync in build script lol --- rebuild.nu | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/rebuild.nu b/rebuild.nu index 0b81908..4bcc197 100755 --- a/rebuild.nu +++ b/rebuild.nu @@ -18,16 +18,11 @@ def main --wrapped [ if $host == (hostname) or $host == "" { sudo sh -c $"nixos-rebuild switch ($flags | str join ' ') |& nom --json" } else { - git ls-files | tar -cf - --files-from - | zstd -c3 | save --force /tmp/config.tar.zst - scp -q /tmp/config.tar.zst ($host + ':/tmp/') + git ls-files | rsync --rsh "ssh -q" --delete --files-from - ./ cube:Configuration - ssh -q $host $" - rm -rf /tmp/config - mkdir /tmp/config - cd /tmp/config - tar -xf /tmp/config.tar.zst - - sh -c 'sudo nixos-rebuild switch ($flags | str join ' ') |& nom --json' - " + ssh -q $host $"sh -c ' + cd Configuration + sudo nixos-rebuild switch ($flags | str join ' ') |& nom --json + '" } }